Time/Date Formats
Format Description Example
%% %  
%a Abbreviated day of the week Thu
%A Day name Thursday
%b Abbreviated month name Apr
%B Month name April
%d The day of the month as a number 13
%D mm/dd/yy date format (or %m/%d/%y) 04/13/00
%e Date of the month as a two digit number ranging from 1 through 31 13
%H The hour (based on 24 hours) as a number ranging from 00 through 23 01
%I The hour (based on 12 hours) as a number ranging from 00 through 12 01
%j The day of the year as a number ranging from 01 through 366 104
%m The month of the year as a number ranging from 01 through 12 04
%M The minutes of an hour as a number ranging from 00 through 59 10
%p AM or PM AM
%r The 12-hour clock time in local AM/PM notation Time as
"%I:%M:%S AM | PM"
01:10:18 AM
%S The seconds of the minute as a decimal number (00 through 59) 18
%T The 24-hour time in "%H:%M:%S" format 01:10:18
%U The week of the year as a number (00 through 52) with Sunday as the first day of the week 15
%w The day of the week as a number (0 through 6) 4
%W The week of the year (00 through 53) with Monday as the first day of the week 15
%y Abbreviated year (00 to 99) 00
%Y Four digit year 2000
%Z The time zone name (if one can be determined) MDT