Skip to content

Date Time Format

Rafael Fassi Lobão edited this page Mar 12, 2022 · 2 revisions

When the column is defined as Date Time type, the format must be specified.

image

Date format

Format Description
d The day as a number without a leading zero (1 to 31).
dd The day as a number with a leading zero (01 to 31).
ddd The abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses the system locale to localize the name.
dddd The long localized day name (e.g. 'Monday' to 'Sunday'). Uses the system locale to localize the name.
M The month as a number without a leading zero (1 to 12).
MM The month as a number with a leading zero (01 to 12).
MMM The abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses the system locale to localize the name.
MMMM The long localized month name (e.g. 'January' to 'December'). Uses the system locale to localize the name.
yy The year as a two digit number (00 to 99).
yyyy The year as a four digit number, possibly plus a leading minus sign for negative years.

Note: Day and month names must be given in the system local language. It is only possible to use the English names if the system language is English.

Time format

Format Description
h The hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hh The hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
H The hour without a leading zero (0 to 23, even with AM/PM display)
HH The hour with a leading zero (00 to 23, even with AM/PM display)
m The minute without a leading zero (0 to 59)
mm The minute with a leading zero (00 to 59)
s The whole second, without any leading zero (0 to 59)
ss The whole second, with a leading zero where applicable (00 to 59)
z The fractional part of the second, to go after a decimal point, without trailing zeroes (0 to 999). Thus "s.z" reports the seconds to full available (millisecond) precision without trailing zeroes.
zzz The fractional part of the second, to millisecond precision, including trailing zeroes where applicable (000 to 999).
AP or A Interpret as an AM/PM time. A/AP will match an upper-case version of the system locale.
ap or a Interpret as an am/pm time. a/ap will match a lower-case version of the system locale.
Clone this wiki locally