Skip to content

Reference for strptime/strftime format strings because the other one didn't do it for me

Notifications You must be signed in to change notification settings

strptime-strftime/strptime-strftime.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

directives for strptime/strftime

reference date time: 2019-06-07 07:03:12.234394

year

year2019%Y
year, 2-digits, zero-padded19%y

month

month full name (locale specific)June%B
month abbreviated name (locale specific)Jun%b
month, zero-padded06%m

day

day of the month, zero-padded07%d
day of the year, zero-padded158%j

time

hour, 24h clock, zero-padded07%H
hour, 12h clock, zero-padded07%I
minute, zero-padded03%M
second, zero-padded12%S
microsecond, zero-padded234394%f
AM/PM (locale specific)AM%p

timezone

time zone nameUTC%Z
UTC offset in the form ±HHMM[SS[.ffffff]]+0000%z

week

weekday full name (locale specific)Friday%A
weekday abbreviated name (locale specific)Fri%a
weekday as a number Sunday is 05%w
week number of the year, zero-padded, Monday first day22%W
week number of the year, zero-padded Sunday first day22%U

locale representation for time/date/datetime

time representation07:03:12%X
date representation06/07/19%x
datetime representationFri Jun 7 07:03:12 2019%c

ISO 8601 parameters

ISO 8601 year2019%G
ISO 8601 weekday5%u
ISO 8601 week number, Monday first day23%V

extra

literal % character%%%

About

Reference for strptime/strftime format strings because the other one didn't do it for me

Topics

Resources

Stars

Watchers

Forks