Conversion Specifiers for strftime

FormatDescriptionExample
%aabbreviated weekday nameTue
%Afull weekday nameTuesday
%babbreviated month name Jan
%Bfull month nameJanuary
%cdate and time Tue Jan 14 19:40:30 1992
%dday of the month: [01,31]14
%Hhour of the 24-hour day: [00,23]19
%Ihour of the 24-hour day: [01,12]07
%jday of the year: [001,366]014
%mmonth: [01,12]01
%Mminute: [00,59]40
%pAM / PMPM
%Ssecond: [00,61]30
%USunday week number: [00,53]02
%wweekday: [0=Sunday,6]2
%WMonday week number: [00,53]02
%xdate01/14/92
%Xtime19 : 40 : 30
%yyear without century: [00,99]92
%Yyear with century1992
%Ztime zone nameMST

Example

"Today is %A. %I:%M %p %Z" => "Today is Tuesday. 07:40 PM KST"
Ãâó: "Advanced Programing in the UNIX Enviroment" 5th Ed., W.Richard Stevens, p158