date formatting key |
%a | am or pm |
%A | AM or PM |
%g | hour of the day, 12hr format, no leading zeros: 1 to 12 |
%G | hour of the day, 12hr format: 01 to 12 |
%h | hour of the day, 24hr format, no leading zeros: 0 to 23 |
%H | hour of the day, 24hr format: 00 to 23 |
%t | minutes of the hour: 00 to 59 |
%T | seconds of the minute: 00 to 59 |
%d | day of month, no leading zeros: 1 to 31 |
%D | day of month, 2 digits: 01 to 31 |
%s | day of month suffix: st, nd, rd, th |
%S | day of month suffix, upper case: ST, ND, RD, TH |
%e | day of week, abreviated: Sun, Mon, etc |
%E | day of week, long form: Sunday |
%w | day of week, as a single digit: 1 -sunday to 7 -saturday |
%z | day of year: 0 to 365 |
%m | month, as digits without leading zeros: 1 to 12 |
%M | month, as 2 digits: 01 to 12 |
%n | month name, abreviated: Jan |
%N | month name, long form: January |
%y | year as 2 digits: 01 |
%Y | year as 4 digits: 2001 |
|