Table4. Conversion Specifiers Used by strftime() (continued)
Specifier Meaning
%O[deHlmMSUwWy] If the alternative date and time format is not available, the %E
descriptors are mapped to their unextended counterparts. For
example, %Od is mapped to %d.
%Od Replace with the day of the month, using the alternative numeric
symbols. Fill as needed with leading zeros if there is any
alternative symbol for zero, otherwise with leading spaces.
%Oe Replace with the day of the month, using the alternative numeric
symbols, filled as needed with leading spaces.
%OH Replace with the hour (24 hour clock) using the alternative
numeric symbols.
%OI Replace with the hour (12 hour clock) using the alternative
numeric symbols.
%Om Replace with the month using the alternative numeric symbols.
%OM Replace with the minutes using the alternative numeric symbols.
%OS Replace with the seconds using the alternative numeric symbols.
%OU Replace with the week number of the year (Sunday as the first day
of the week, rules corresponding to %U) using the alternative
numeric symbols.
%Ow Replace with the weekday (Sunday=0) using the alternative
numeric symbols.
%OW Replace with the week number of the year (Monday as the first
day of the week) using the alternative numeric symbols.
%Oy Replace with the year (offset from %C) in the alternative
representation and using the alternative numeric symbols.
%p Replace with the local equivalent of AM or PM.
%r Replace with the string equivalent to %I:%M:%S %p
%R Replace with the time in 24 hour notation (%H:%M).
%S Replace with seconds (00-61).
%t Replace with a tab.
%T Replace with a string equivalent to %H:%M:%S.
%u Replace with a weekday as a decimal number (1 to 7), with a 1
representing Monday.
%U Replace with the week number of the year (00-53) where Sunday is
the first day of the week.
%V Replace with the week number of the year (01-53) where Monday
is the first day of the week.
%w Replace with the weekday (0-6) where Sunday is 0.
%W Replace with the week number of the year (00-53) where Monday
is the first day of the week.
%x Replace with the appropriate date representation.
%XReplace with the appropriate time representation.
%y Replace with the year with the century.
%Y Replace with the year with the current century.
%Z Replace with the name of the time zone or no characters if the time
zone is not known.
134 WebProgramming Guide V4R5