%char | Substitution
|
| %a | Locale's Abbreviated Weekday Name
|
| %A | Locale's Weekday Name
|
| %b | Locale's Abbreviated Month Name
|
| %B | Locale's Month Name
|
| %c | Locale's Appropriate Date And Time Representation
|
| %C | The century of the year. Equivalent to the greatest integer not grerater than the year divided by 100.
|
| %d | Day Of The Month As A Decimal Number (01-31)
|
| %D | The date using the format '%m/%d/%y'
|
| %e | The day of the month like '%d', but padded with a blank ( 1-31)
|
| %F | The date using the format: %Y-%m-%d
|
| %g | The year corresponding to the ISO week number, but without the century. (00-99)
|
| %G | The year corresponding to the ISO week number.
|
| %h | Locale's Abbreviated Month Name. Same as '%b'
|
| %H | The Hour (24-hour Clock) As A Decimal Number (00-23)
|
| %I | The Hour (12-hour Clock) As A Decimal Number (01-12)
|
| %j | The Day Of The Year As A Decimal Number (001-366)
|
| %k | The Hour (24-hour Clock) As A Decimal Number (00-23). Same as '%H', but padded with a blank
|
| %l | The Hour (12-hour Clock) As A Decimal Number (01-12). Same as '%I', but padded with a blank
|
| %m | The Month As A Decimal Number (01-12)
|
| %M | The Minute As A Decimal Number (00-5 9)
|
| %n | a single newline character
|
| %p | The Locale's Equivalent Of The AM/PM Designations Associated With A 12-hour Clock. Noon is treated as 'PM' midnight as 'AM'
|
| %P | The Locale's Equivalent Of The am/pm Designations Associated With A 12-hour Clock. Noon is treated as 'pm' midnight as 'am'
|
| %r | The complete time using the am/pm format of the current locale
|
| %R | The hour and minute in decimal numbers using the format "%H:%M"
|
| %s | The number of seconds since the epoch, i.e., since 1970-01-01 00:00:00 UTC
|
| %S | The Second As Decimal Number (00-61)
|
| %t | A single tab character '\t'
|
| %T | The time using decimal numbers using the format "%H:%M:%S"
|
| %u | The day of the week as a decimal number (1-7), Monday being 1
|
| %U | The Week Number Of The Year (the First Sunday As The First Day Of Week 1) As A Decimal Number (00-53).
All days preceeding the first Sunday of the year are considered to be in week 00.
|
| %V | The ISO 8601:1988 week number as a decimal number (01-53). Weeks start with Monday and end with sunday.
Week 01 of a year is the first week with a majority of its days in that year;
this is equivalent to the week containing the year's first Thursday, and it is also equivalent to the
week containing January 4. Wek 01 can contain days from the previous year. The week before week 01
of a year is the last week (52 or 53) of the previous year even if it contains days from the new year.
|
| %w | The Weekday As A Decimal Number (0-6), Where Sunday Is 0
|
| %W | The Week Number Of The Year (the First Monday As The First Day Of Week 1) As A Decimal Number (00-53).
All days preceeding the first Monday of the year are considered to be in week 00.
|
| %x | The Locale's Appropriate Date Representation
|
| %X | The Locale's Appropriate Time Representation
|
| %y | The Year Without Century As A Decimal Number (00-99). Equivalent to the year modulo 100.
|
| %Y | The Year With Century As A Decimal Number
|
| %z | ISO 8601:1988 style numeric time zone, or nothing if no time zone is determinable
|
| %Z | The Time Zone Name Or Abbreviation, Or By No Character If No Time Zone Is Indeterminable
|
| %% | %
|
fmt_str | Formatted Value
|
| %m/%d/%y | mm/dd/yy
|
| %m/%d/%Y | mm/dd/yyyy
|
| %d/%m/%y | dd/mm/yy
|
| %d/%m/%Y | dd/mm/yyyy
|
| %b %d, %Y | abbrev. month dd, yyyy
|
| %B %d, %Y | month dd, yyyy
|
| %a %m/%d/%Y | abbrev weekday mm/dd/yyyy
|
| %A %m/%d/%Y | weekday mm/dd/yyyy
|
| %a, %b %d, %Y | abbrev. weekday, abbrev. month dd, yyyy
|
| %A, %B %d, %Y | weekday, month dd, yyyy
|
| %b | return ASCII string for abbrev. month name
|
| %B | return ASCII string for month name
|
| %a | return ASCII string for abbrev. day name
|
| %A | return ASCII string for day name
|
| %y%m%d | return date in yymmdd form for sorting
|
| %Y%m%d | return date in yyyymmdd form for sorting
|
| %j | return number of days this year
|
| %H:%M:%S | hh:mm:ss 0 <= hh <= 24
|
| %H:%M | hh:mm 0 <= hh <= 24
|
| %I:%M:%S %p | hh:mm:ss AM/PM
|
| %I:%M %p | hh:mm AM/PM
|