Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
FPSpreadsheet
»
Displaying a date as MMM YYYY
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
FPC Unleashed (inline var...
by
440bx
[
Today
at 08:09:20 am]
Ann: DeCoperators
by
Fibonacci
[
Today
at 07:14:59 am]
Error: Compilation raised...
by
Khrys
[
Today
at 06:22:32 am]
I hope FreePascal can sup...
by
xiyi0616
[
Today
at 05:49:05 am]
[Solved] Help needed comp...
by
landolfi
[
Today
at 02:45:10 am]
Delimited text - how find...
by
Remy Lebeau
[
Today
at 02:26:15 am]
AI assisted translation o...
by
MathMan
[
Today
at 12:55:30 am]
DataPort or Synpase stat...
by
eldonfsr
[April 16, 2026, 11:32:18 pm]
Ann: Deinline: a de-inlin...
by
LeP
[April 16, 2026, 11:27:18 pm]
[FPC 3.2.4, Windows] PTC ...
by
Fred vS
[April 16, 2026, 08:26:24 pm]
Cannot build Units for Si...
by
NormanDunbar
[April 16, 2026, 07:39:07 pm]
IDE: Property editor does...
by
dsiders
[April 16, 2026, 07:04:22 pm]
What is wrong with this c...
by
OH1KH
[April 16, 2026, 04:32:48 pm]
[work arounded]Naming dae...
by
LeP
[April 16, 2026, 03:36:10 pm]
Lazarus Bugfix Release 4....
by
Jonax
[April 16, 2026, 03:06:25 pm]
CudaText editor (written ...
by
AlexTP
[April 16, 2026, 10:43:12 am]
C header function with on...
by
440bx
[April 16, 2026, 09:13:38 am]
(Solved)TUpDown KeyDown ...
by
LeP
[April 15, 2026, 11:21:09 pm]
Zipper: Addition of mult...
by
marcov
[April 15, 2026, 10:35:15 pm]
Seeking advice on setting...
by
gidesa
[April 15, 2026, 07:02:04 pm]
GTK3: FillRect() mispaint...
by
baldzhang
[April 15, 2026, 06:32:52 pm]
Lazarus Image Editor
by
Paolo
[April 15, 2026, 05:37:30 pm]
RunFormula: math expressi...
by
Handoko
[April 15, 2026, 01:24:30 pm]
How to merge multiple cla...
by
cdbc
[April 15, 2026, 12:48:42 pm]
PWM signals, atmega328p, ...
by
pascalbythree
[April 15, 2026, 12:39:25 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Displaying a date as MMM YYYY (Read 3136 times)
talorigomat
Jr. Member
Posts: 96
Displaying a date as MMM YYYY
«
on:
June 30, 2016, 03:07:59 pm »
How do you use the custom number format. I want to write a date so it displays like: Jan 2010.
Logged
Lazarus 1.8.0Rc4, Windows 10
Zoran
Hero Member
Posts: 1988
Re: Displaying a date as MMM YYYY
«
Reply #1 on:
June 30, 2016, 03:38:06 pm »
Use
FormatDateTime function
with FormatStr parameter.
See the complete list how to use FormatStr parameter here:
FormatChars
For example:
Code: Pascal
[Select]
[+]
[-]
var
S
:
String
;
D
:
TDate
;
...
S
:
=
FormatDateTime
(
'mmm yyyy'
,
D
)
;
Logged
Swan, ZX Spectrum emulator
https://github.com/zoran-vucenovic/swan
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
FPSpreadsheet
»
Displaying a date as MMM YYYY
TinyPortal
© 2005-2018