VBScript Date Format Functions


/ Published in: ASP
Save to your folder(s)

Format strings:

* %A - AM or PM
* %a - am or pm
* %m - Month with leading zeroes (01 - 12)
* %n - Month without leading zeroes (1 - 12)
* %F - Month name (January - December)
* %M - Three letter month name (Jan - Dec)
* $d - Day with leading zeroes (01 - 31)
* %j - Day without leading zeroes (1 - 31)
* %H - Hour with leading zeroes (12 hour)
* %h - Hour with leading zeroes (24 hour)
* %G - Hour without leading zeroes (12 hour)
* %g - Hour without leading zeroes (24 hour)
* %i - Minute with leading zeroes (01 to 60)
* %I - Minute without leading zeroes (1 to 60)
* %s - Second with leading zeroes (01 to 60)
* %S - Second without leading zeroes (1 to 60)
* %L - Number of day of week (1 to 7)
* %l - Name of day of week (Sunday to Saturday)
* %D - Three letter name of day of week (Sun to Sat)
* %O - Ordinal suffix (st, nd rd, th)
* %U - UNIX Timestamp
* %Y - Four digit year (2003)
* %y - Two digit year (03)

URL: http://www.addedbytes.com/asp/vbscript-date-format-functions/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.