date | (Date) Date to be formatted |
---|---|
format | [optional] (Integer) Numeric value specifies the date/time format used.
If not set, then 0 is used. 0 - (vbGeneralDate) Displays a date and/or time. For real numbers, show a date and time. If there is no fractional part, then show only a date. If there is no integer part, then show time only. Date and time is shown by system settings of the computer.
1 - (vbLongDate) Display a date using the long date format specified in your computer's regional settings
2 - (vbShortDate) Display a date using the short date format specified in your computer's regional settings
3 - (vbLongTime) Display a time using the long time format specified in your computer's regional settings
4 - (vbShortTime) Display a time using the short time format specified in your computer's regional settings |
Dim sCurrentDate
sCurrentDate = FormatDateTime(Date, 1)