Go Time Format & strftime Converter
Write a Go time layout and see the current time formatted with it, convert between Go layouts and strftime, and look up the reference-time tokens.
Edit either field and the other one follows.
Go's reference time is Mon Jan 2 15:04:05 MST 2006. Written as 01/02 03:04:05PM '06 -0700, its parts count from 1 to 7: month, day, hour, minute, second, year and zone offset. Select a token to insert it into the layout at the cursor.
| Go token | Meaning | strftime | Now |
|---|---|---|---|
| Year, four digits | %Y | ||
| Year, last two digits | %y | ||
| Month as a number, two digits | %m | ||
| Month as a number, without a leading zero | %-m | ||
| Month name, abbreviated | %b | ||
| Month name, in full | %B | ||
| Day of the month, two digits | %d | ||
| Day of the month, without a leading zero | %-d | ||
| Day of the month, padded with a space | %e | ||
| Day of the year, three digits | %j | ||
| Hour on the 24-hour clock, two digits | %H | ||
| Hour on the 12-hour clock, two digits | %I | ||
| Hour on the 12-hour clock, without a leading zero | %-I | ||
| Minute, two digits | %M | ||
| Second, two digits | %S | ||
| AM or PM | %p | ||
| Weekday name, abbreviated | %a | ||
| Weekday name, in full | %A | ||
| Time zone abbreviation | %Z | ||
| UTC offset in hours and minutes, without a colon | %z | ||
| UTC offset in hours and minutes, with a colon | %:z | ||
| UTC offset with a colon, or the letter Z when the offset is zero | — | ||
| Fraction of a second with a fixed number of digits, one for each zero | .%L | ||
| Fraction of a second without trailing zeros, at most one digit for each nine | — |