The strftime table

Specifier Replaced by Example
%A Full weekday name Monday, Friday
%b Full month name April, May, June
%B Abbreviated month name Apr, May, Jun
%c Appropriate date and time representation Do 22 Dez 2022 20:52:34 CET
%d Day of the month (with a leading zero) 01, 04, 12
%D Formats the date 12/06/79
%e Day of the month (without a leading zero) 3, 4, 12
%F Date in ISO 8601 format YYYY-MM-DD 1979-01-30
%H Hour of the day, 24-hour time 01-23
%I Hour of the day, 12-hour time 01-11
%j Day of the year 080
%k Hour of the day, 24-hour time (without a leading zero) 0-23
%m Month of the year 01-12
%M Minute of the hour 00-59
%p AM or PM designation AM, PM
%P am or pm designation am, pm
%r 12-hour time 2:32:59 AM
%R 24-hour time HH:MM 16:33
%T Time in ISO 8601 format HH:MM:SS 16:33:59
%s Amount of seconds since 1970-01-01 00:00:00 UTC
%S Second of the minute 00-60
%U Week number with the first Sunday as the first day of week one 00-53
%V Week number in ISO 8601 format 01-53
%w Day of the week with Sunday as 0 0-6
%W Week number of the current year, starting with the first Monday as the first day of the first week 00-53
%x Preferred date representation 03/10/22
%X Preferred time representation 13:23:01
%y Year without a century (last two digits) 00-99
%Y Year 1979, 2022
%Z Timezone name or abbreviation EEST, CDT, UTC

Links

Comments