Date Time Format Strings
Specifier Displays
Specifier | Displays |
---|---|
c | Displays the date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the date-time value indicates midnight precisely. |
d | Displays the day as a number without a leading zero (1-31). |
dd | Displays the day as a number with a leading zero (01-31). |
ddd | Displays the day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable. |
dddd | Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable. |
ddddd | Displays the date using the format given by the ShortDateFormat global variable. |
dddddd | Displays the date using the format given by the LongDateFormat global variable. |
e | |
ee | |
m | |
mm | |
mmm | |
mmmm | |
yy | |
yyyy | |
h | |
hh | |
n | |
nn | |
s | |
ss | |
z | |
zzz | |
t | |
tt | |
am/pm | |
a/p | |
ampm | |
/ | |
: | |
'xx'/"xx" |