Version: 2.0
The FormatDateTime function formats dates and times. The output
format is: MM/DD/YYYY
Date Format Constants
CONSTANT | VALUE | DESCRIPTION |
---|---|---|
VBGeneralDate | 0 | Display the date and time using system settings |
VBLongDate | 1 | Display the date in long date format Saturday, June 26, 1943 |
VBShortDate | 2 | Display the date in short date
format 6/26/43 |
VBLongTime | 3 | Display the time in long time format 3:48:01 PM |
VBShortTime | 4 | Display the time in short time format
(24 hour clock) 15:48 |
<% =FormatDateTime("6/26/43") %>
<% =FormatDateTime("15:34") %>
6/26/1943
3:34:00 PM
<% =FormatDateTime("6/26/1943", 1) %>
<% =FormatDateTime("3:34:00 PM", 4) %>
Saturday, June 26, 1943
15:34