This is a default function within VBScript that should work in any VBScript situation.
FormatDateTime(date,format)
Date is required and has to be in a valid format but easily can accept date() or now()
Date() would only display the current date where now() would be date and time.
Format would be something like below
0 = vbGeneralDate – Default. Returns date: mm/dd/yy and time if specified: hh:mm:ss PM/AM.
1 = vbLongDate – Returns date: weekday, monthname, year
2 = vbShortDate – Returns date: mm/dd/yy
3 = vbLongTime – Returns time: hh:mm:ss PM/AM
4 = vbShortTime – Return time: hh:mm
Last Updated on October 26, 2015