Date Format Constants
The
FormatDateTime
function allows you to specify the
format in which a date or time is displayed by choosing one of the
date format constants to supply to its
NamedFormat parameter:
|
Constant |
Value |
Description |
|---|---|---|
|
|
0 |
Display a date in short date format and a time in long time format. If present, both parts are displayed. |
|
|
1 |
Use the long date format defined in the local computer’s regional settings. |
|
|
3 |
Use the long time format defined in the local computer’s regional settings. |
|
|
2 |
Use the short date format defined in the local computer’s regional settings. |
|
|
4 |
Use the short time format defined in the local computer’s regional settings. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access