Documents

NextGrid & NextDBGrid

NextGrid

NextDBGrid

NextInspector

NextSheet

NextCollection

Misc

Labs

NextGrid .NET

DateTime FormatMask

Related Articles:

Info
  • Skill:
  • Version: 1.0.0
  • Author: Bojan Nikolic
  • Created: 2008-04-29
  • Updated: 2008-04-29
At many places our components having FormatMask property. When this property is used to format date or time, we are using standard Delphi/CBuilder FormatDateTime function.

Since we ofter have requeststs abot this functions, please read bellow for full examples about using this property.

Example:

FormatMask := 'm.d.yyyy'


Example:

Edit1.Text := FormatDateTime('m.d.yyyy', Now);


Table 1: FormatDateTime rules
Rule Example Description
m 5 month 1 - 12
mm 05 month 01 - 12
mmm Apr short month name
mmmm May full month name
d 9 day 1 - 31
dd 09 day 01 - 31
ddd Thu short day name
dddd Monday full day name
y, yy 08 last two diggits of year
yyy, yyyy 08 full year number
h 7 Hour number
hh 07 Hour number

Was This Article Useful?

Only constructive comments, code contributions... will be publishes. Questions, non-official discussion will not be published.