Time specification follows:
Table 1. Recognized format strings for time functions
Format String | Description | Range | Example |
---|---|---|---|
%c | date and time | Mon Apr 12 14:17:46 2004 | |
%x | date | 01/18/2004 | |
%X | time | 14:17:46 | |
%Y %y | year | 2004 04 | |
%j | day of the year | 0-366 | 112 |
%m | month | 01-12 | 01 |
%B %b | month name | January Jan | |
%d %e | day of the month | 01-31 | 08 8 |
%U %W | week number, week starts Sunday (%U) or Monday (%W) | 00-53 | 48 47 |
%w %u | weekday | 0-6 | 03 3 |
%A %a | weekday name | Sunday Sun | |
%H %I | hour | 00-23 00-12 | 23 11 |
%p | AM/PM | PM | |
%M | minute | 00-59 | 57 |
%s | seconds since epoch | 1233908038 | |
%S | second | 00-59 | 57 |
%Z | time zone name | CEST |