Comparison between some valid RFC 3339 and ISO 8601 date formats
Notes:
- This table is not exhaustive.
- Both formats are case-insensitive so every
T
,W
,P
,R
, andZ
could bet
,w
,p
,r
, orz
respectively. - RFC 3339 allows for other characters to replace the
T
but only gives examples using a space character. - ISO 8601 allows decimal fractions for the smallest time value. These are just represented by
,5
and.5
due to a limitation of the formatter. - ISO 8601 prefers commas to dots for decimal separation but they are interchangeable in all formats.
- The format key is given below the table.
Format | Now | RFC 3339 | ISO 8601 |
---|---|---|---|
%Y-%m-%d %H:%M:%SZ | 2021-07-27 14:20:32Z | ✔️ | |
%Y-%m-%d_%H:%M:%SZ | 2021-07-27_14:20:32Z | ✔️ | |
%Y-%m-%d %H:%M:%Sz | 2021-07-27 14:20:32z | ✔️ | |
%Y-%m-%d_%H:%M:%Sz | 2021-07-27_14:20:32z | ✔️ | |
%Y-%m-%d %H:%M:%S.%UZ | 2021-07-27 14:20:32.556Z | ✔️ | |
%Y-%m-%d_%H:%M:%S.%UZ | 2021-07-27_14:20:32.556Z | ✔️ | |
%Y-%m-%d %H:%M:%S.%Uz | 2021-07-27 14:20:32.556z | ✔️ | |
%Y-%m-%d_%H:%M:%S.%Uz | 2021-07-27_14:20:32.556z | ✔️ | |
%Y-%m-%d %H:%M:%S-00:00 | 2021-07-27 14:20:32-00:00 | ✔️ | |
%Y-%m-%d %H:%M:%S.%U-00:00 | 2021-07-27 14:20:32.556-00:00 | ✔️ | |
%Y-%m-%dT%H:%M:%S-00:00 | 2021-07-27T14:20:32-00:00 | ✔️ | |
%Y-%m-%dT%H:%M:%S.%U-00:00 | 2021-07-27T14:20:32.556-00:00 | ✔️ | |
%Y-%m-%d | 2021-07-27 | ✔️ | ✔️ |
%H:%M:%SZ | 14:20:32Z | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%SZ | 2021-07-27T14:20:32Z | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%S.%UZ | 2021-07-27T14:20:32.556Z | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%S+00:00 | 2021-07-27T14:20:32+00:00 | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%S.%U+00:00 | 2021-07-27T14:20:32.556+00:00 | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%S%Z:%z | 2021-07-27T22:20:32+08:00 | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%S.%U%Z:%z | 2021-07-27T22:20:32.556+08:00 | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%S-04:00 | 2021-07-27T10:20:32-04:00 | ✔️ | ✔️ |
%Y-%m-%dT%H:%M:%S.%U-04:00 | 2021-07-27T10:20:32.556-04:00 | ✔️ | ✔️ |
%Y-%m-%dT%H−04:00 | 2021-07-27T10−04:00 | ✔️ | |
%Y-%m-%dT%H:%M−04:00 | 2021-07-27T10:20−04:00 | ✔️ | |
%Y-%m-%dT%H:%M:%S−04:00 | 2021-07-27T10:20:32−04:00 | ✔️ | |
%Y-%m-%dT%H:%M:%S,%U−04:00 | 2021-07-27T10:20:32,556−04:00 | ✔️ | |
%Y-%m-%dT%H:%M:%S.%U−04:00 | 2021-07-27T10:20:32.556−04:00 | ✔️ | |
%C | 20 | ✔️ | |
%Y | 2021 | ✔️ | |
%Y-%m | 2021-07 | ✔️ | |
%Y-%o | 2021-208 | ✔️ | |
%Y-W%W | 2021-W30 | ✔️ | |
%Y-W%W-%w | 2021-W30-2 | ✔️ | |
%Y%o | 2021208 | ✔️ | |
%YW%W | 2021W30 | ✔️ | |
%YW%W%w | 2021W302 | ✔️ | |
%H | 22 | ✔️ | |
%H,5 | 22,5 | ✔️ | |
%H.5 | 22.5 | ✔️ | |
%H:%M | 22:20 | ✔️ | |
%H:%M,5 | 22:20,5 | ✔️ | |
%H:%M.5 | 22:20.5 | ✔️ | |
%H:%M:%S | 22:20:32 | ✔️ | |
%H:%M:%S,%U | 22:20:32,556 | ✔️ | |
%H:%M:%S.%U | 22:20:32.556 | ✔️ | |
T%H | T22 | ✔️ | |
T%H,5 | T22,5 | ✔️ | |
T%H.5 | T22.5 | ✔️ | |
T%H:%M | T22:20 | ✔️ | |
T%H:%M,5 | T22:20,5 | ✔️ | |
T%H:%M.5 | T22:20.5 | ✔️ | |
T%H:%M:%S | T22:20:32 | ✔️ | |
T%H:%M:%S,%U | T22:20:32,556 | ✔️ | |
T%H:%M:%S.%U | T22:20:32.556 | ✔️ | |
%Y-%m-%dT%H | 2021-07-27T22 | ✔️ | |
%Y-%m-%dT%H,5 | 2021-07-27T22,5 | ✔️ | |
%Y-%m-%dT%H.5 | 2021-07-27T22.5 | ✔️ | |
%Y-%m-%dT%H:%M | 2021-07-27T22:20 | ✔️ | |
%Y-%m-%dT%H:%M,5 | 2021-07-27T22:20,5 | ✔️ | |
%Y-%m-%dT%H:%M.5 | 2021-07-27T22:20.5 | ✔️ | |
%Y-%m-%dT%H:%M:%S | 2021-07-27T22:20:32 | ✔️ | |
%Y-%m-%dT%H:%M:%S,%U | 2021-07-27T22:20:32,556 | ✔️ | |
%Y-%m-%dT%H:%M:%S.%U | 2021-07-27T22:20:32.556 | ✔️ | |
%G-W%W-%wT%H | 2021-W30-2T22 | ✔️ | |
%G-W%W-%wT%H,5 | 2021-W30-2T22,5 | ✔️ | |
%G-W%W-%wT%H.5 | 2021-W30-2T22.5 | ✔️ | |
%G-W%W-%wT%H:%M | 2021-W30-2T22:20 | ✔️ | |
%G-W%W-%wT%H:%M,5 | 2021-W30-2T22:20,5 | ✔️ | |
%G-W%W-%wT%H:%M.5 | 2021-W30-2T22:20.5 | ✔️ | |
%G-W%W-%wT%H:%M:%S | 2021-W30-2T22:20:32 | ✔️ | |
%G-W%W-%wT%H:%M:%S,%U | 2021-W30-2T22:20:32,556 | ✔️ | |
%G-W%W-%wT%H:%M:%S.%U | 2021-W30-2T22:20:32.556 | ✔️ | |
%Y-%oT%H | 2021-208T22 | ✔️ | |
%Y-%oT%H,5 | 2021-208T22,5 | ✔️ | |
%Y-%oT%H.5 | 2021-208T22.5 | ✔️ | |
%Y-%oT%H:%M | 2021-208T22:20 | ✔️ | |
%Y-%oT%H:%M,5 | 2021-208T22:20,5 | ✔️ | |
%Y-%oT%H:%M.5 | 2021-208T22:20.5 | ✔️ | |
%Y-%oT%H:%M:%S | 2021-208T22:20:32 | ✔️ | |
%Y-%oT%H:%M:%S,%U | 2021-208T22:20:32,556 | ✔️ | |
%Y-%oT%H:%M:%S.%U | 2021-208T22:20:32.556 | ✔️ | |
%Y%m%dT%H | 20210727T22 | ✔️ | |
%Y%m%dT%H,5 | 20210727T22,5 | ✔️ | |
%Y%m%dT%H.5 | 20210727T22.5 | ✔️ | |
%Y%m%dT%H%M | 20210727T2220 | ✔️ | |
%Y%m%dT%H%M,5 | 20210727T2220,5 | ✔️ | |
%Y%m%dT%H%M.5 | 20210727T2220.5 | ✔️ | |
%Y%m%dT%H%M%S | 20210727T222032 | ✔️ | |
%Y%m%dT%H%M%S,%U | 20210727T222032,556 | ✔️ | |
%Y%m%dT%H%M%S.%U | 20210727T222032.556 | ✔️ | |
%GW%W%wT%H | 2021W302T22 | ✔️ | |
%GW%W%wT%H,5 | 2021W302T22,5 | ✔️ | |
%GW%W%wT%H.5 | 2021W302T22.5 | ✔️ | |
%GW%W%wT%H%M | 2021W302T2220 | ✔️ | |
%GW%W%wT%H%M,5 | 2021W302T2220,5 | ✔️ | |
%GW%W%wT%H%M.5 | 2021W302T2220.5 | ✔️ | |
%GW%W%wT%H%M%S | 2021W302T222032 | ✔️ | |
%GW%W%wT%H%M%S,%U | 2021W302T222032,556 | ✔️ | |
%GW%W%wT%H%M%S.%U | 2021W302T222032.556 | ✔️ | |
%Y%oT%H | 2021208T22 | ✔️ | |
%Y%oT%H,5 | 2021208T22,5 | ✔️ | |
%Y%oT%H.5 | 2021208T22.5 | ✔️ | |
%Y%oT%H%M | 2021208T2220 | ✔️ | |
%Y%oT%H%M,5 | 2021208T2220,5 | ✔️ | |
%Y%oT%H%M.5 | 2021208T2220.5 | ✔️ | |
%Y%oT%H%M%S | 2021208T222032 | ✔️ | |
%Y%oT%H%M%S,%U | 2021208T222032,556 | ✔️ | |
%Y%oT%H%M%S.%U | 2021208T222032.556 | ✔️ | |
%Y-%m-%dT%H%Z | 2021-07-27T22+08 | ✔️ | |
%Y-%m-%dT%H,5%Z | 2021-07-27T22,5+08 | ✔️ | |
%Y-%m-%dT%H.5%Z | 2021-07-27T22.5+08 | ✔️ | |
%Y-%m-%dT%H:%M%Z | 2021-07-27T22:20+08 | ✔️ | |
%Y-%m-%dT%H:%M,5%Z | 2021-07-27T22:20,5+08 | ✔️ | |
%Y-%m-%dT%H:%M.5%Z | 2021-07-27T22:20.5+08 | ✔️ | |
%Y-%m-%dT%H:%M:%S%Z | 2021-07-27T22:20:32+08 | ✔️ | |
%Y-%m-%dT%H:%M:%S,%U%Z | 2021-07-27T22:20:32,556+08 | ✔️ | |
%Y-%m-%dT%H:%M:%S.%U%Z | 2021-07-27T22:20:32.556+08 | ✔️ | |
%G-W%W-%wT%H%Z | 2021-W30-2T22+08 | ✔️ | |
%G-W%W-%wT%H,5%Z | 2021-W30-2T22,5+08 | ✔️ | |
%G-W%W-%wT%H.5%Z | 2021-W30-2T22.5+08 | ✔️ | |
%G-W%W-%wT%H:%M%Z | 2021-W30-2T22:20+08 | ✔️ | |
%G-W%W-%wT%H:%M,5%Z | 2021-W30-2T22:20,5+08 | ✔️ | |
%G-W%W-%wT%H:%M.5%Z | 2021-W30-2T22:20.5+08 | ✔️ | |
%G-W%W-%wT%H:%M:%S%Z | 2021-W30-2T22:20:32+08 | ✔️ | |
%G-W%W-%wT%H:%M:%S,%U%Z | 2021-W30-2T22:20:32,556+08 | ✔️ | |
%G-W%W-%wT%H:%M:%S.%U%Z | 2021-W30-2T22:20:32.556+08 | ✔️ | |
%Y-%oT%H%Z | 2021-208T22+08 | ✔️ | |
%Y-%oT%H,5%Z | 2021-208T22,5+08 | ✔️ | |
%Y-%oT%H.5%Z | 2021-208T22.5+08 | ✔️ | |
%Y-%oT%H:%M%Z | 2021-208T22:20+08 | ✔️ | |
%Y-%oT%H:%M,5%Z | 2021-208T22:20,5+08 | ✔️ | |
%Y-%oT%H:%M.5%Z | 2021-208T22:20.5+08 | ✔️ | |
%Y-%oT%H:%M:%S%Z | 2021-208T22:20:32+08 | ✔️ | |
%Y-%oT%H:%M:%S,%U%Z | 2021-208T22:20:32,556+08 | ✔️ | |
%Y-%oT%H:%M:%S.%U%Z | 2021-208T22:20:32.556+08 | ✔️ | |
%Y%m%dT%H%Z | 20210727T22+08 | ✔️ | |
%Y%m%dT%H,5%Z | 20210727T22,5+08 | ✔️ | |
%Y%m%dT%H.5%Z | 20210727T22.5+08 | ✔️ | |
%Y%m%dT%H%M%Z | 20210727T2220+08 | ✔️ | |
%Y%m%dT%H%M,5%Z | 20210727T2220,5+08 | ✔️ | |
%Y%m%dT%H%M.5%Z | 20210727T2220.5+08 | ✔️ | |
%Y%m%dT%H%M%S%Z | 20210727T222032+08 | ✔️ | |
%Y%m%dT%H%M%S,%U%Z | 20210727T222032,556+08 | ✔️ | |
%Y%m%dT%H%M%S.%U%Z | 20210727T222032.556+08 | ✔️ | |
%GW%W%wT%H%Z | 2021W302T22+08 | ✔️ | |
%GW%W%wT%H,5%Z | 2021W302T22,5+08 | ✔️ | |
%GW%W%wT%H.5%Z | 2021W302T22.5+08 | ✔️ | |
%GW%W%wT%H%M%Z | 2021W302T2220+08 | ✔️ | |
%GW%W%wT%H%M,5%Z | 2021W302T2220,5+08 | ✔️ | |
%GW%W%wT%H%M.5%Z | 2021W302T2220.5+08 | ✔️ | |
%GW%W%wT%H%M%S%Z | 2021W302T222032+08 | ✔️ | |
%GW%W%wT%H%M%S,%U%Z | 2021W302T222032,556+08 | ✔️ | |
%GW%W%wT%H%M%S.%U%Z | 2021W302T222032.556+08 | ✔️ | |
%Y%oT%H%Z | 2021208T22+08 | ✔️ | |
%Y%oT%H,5%Z | 2021208T22,5+08 | ✔️ | |
%Y%oT%H.5%Z | 2021208T22.5+08 | ✔️ | |
%Y%oT%H%M%Z | 2021208T2220+08 | ✔️ | |
%Y%oT%H%M,5%Z | 2021208T2220,5+08 | ✔️ | |
%Y%oT%H%M.5%Z | 2021208T2220.5+08 | ✔️ | |
%Y%oT%H%M%S%Z | 2021208T222032+08 | ✔️ | |
%Y%oT%H%M%S,%U%Z | 2021208T222032,556+08 | ✔️ | |
%Y%oT%H%M%S.%U%Z | 2021208T222032.556+08 | ✔️ | |
%Y-%m-%dT%H%Z:%z | 2021-07-27T22+08:00 | ✔️ | |
%Y-%m-%dT%H,5%Z:%z | 2021-07-27T22,5+08:00 | ✔️ | |
%Y-%m-%dT%H.5%Z:%z | 2021-07-27T22.5+08:00 | ✔️ | |
%Y-%m-%dT%H:%M%Z:%z | 2021-07-27T22:20+08:00 | ✔️ | |
%Y-%m-%dT%H:%M,5%Z:%z | 2021-07-27T22:20,5+08:00 | ✔️ | |
%Y-%m-%dT%H:%M.5%Z:%z | 2021-07-27T22:20.5+08:00 | ✔️ | |
%Y-%m-%dT%H:%M:%S,%U%Z:%z | 2021-07-27T22:20:32,556+08:00 | ✔️ | |
%G-W%W-%wT%H%Z:%z | 2021-W30-2T22+08:00 | ✔️ | |
%G-W%W-%wT%H,5%Z:%z | 2021-W30-2T22,5+08:00 | ✔️ | |
%G-W%W-%wT%H.5%Z:%z | 2021-W30-2T22.5+08:00 | ✔️ | |
%G-W%W-%wT%H:%M%Z:%z | 2021-W30-2T22:20+08:00 | ✔️ | |
%G-W%W-%wT%H:%M,5%Z:%z | 2021-W30-2T22:20,5+08:00 | ✔️ | |
%G-W%W-%wT%H:%M.5%Z:%z | 2021-W30-2T22:20.5+08:00 | ✔️ | |
%G-W%W-%wT%H:%M:%S%Z:%z | 2021-W30-2T22:20:32+08:00 | ✔️ | |
%G-W%W-%wT%H:%M:%S,%U%Z:%z | 2021-W30-2T22:20:32,556+08:00 | ✔️ | |
%G-W%W-%wT%H:%M:%S.%U%Z:%z | 2021-W30-2T22:20:32.556+08:00 | ✔️ | |
%Y-%oT%H%Z:%z | 2021-208T22+08:00 | ✔️ | |
%Y-%oT%H,5%Z:%z | 2021-208T22,5+08:00 | ✔️ | |
%Y-%oT%H.5%Z:%z | 2021-208T22.5+08:00 | ✔️ | |
%Y-%oT%H:%M%Z:%z | 2021-208T22:20+08:00 | ✔️ | |
%Y-%oT%H:%M,5%Z:%z | 2021-208T22:20,5+08:00 | ✔️ | |
%Y-%oT%H:%M.5%Z:%z | 2021-208T22:20.5+08:00 | ✔️ | |
%Y-%oT%H:%M:%S%Z:%z | 2021-208T22:20:32+08:00 | ✔️ | |
%Y-%oT%H:%M:%S,%U%Z:%z | 2021-208T22:20:32,556+08:00 | ✔️ | |
%Y-%oT%H:%M:%S.%U%Z:%z | 2021-208T22:20:32.556+08:00 | ✔️ | |
%Y%m%dT%H%Z%z | 20210727T22+0800 | ✔️ | |
%Y%m%dT%H,5%Z%z | 20210727T22,5+0800 | ✔️ | |
%Y%m%dT%H.5%Z%z | 20210727T22.5+0800 | ✔️ | |
%Y%m%dT%H%M%Z%z | 20210727T2220+0800 | ✔️ | |
%Y%m%dT%H%M,5%Z%z | 20210727T2220,5+0800 | ✔️ | |
%Y%m%dT%H%M.5%Z%z | 20210727T2220.5+0800 | ✔️ | |
%Y%m%dT%H%M%S%Z%z | 20210727T222032+0800 | ✔️ | |
%Y%m%dT%H%M%S,%U%Z%z | 20210727T222032,556+0800 | ✔️ | |
%Y%m%dT%H%M%S.%U%Z%z | 20210727T222032.556+0800 | ✔️ | |
%GW%W%wT%H%Z%z | 2021W302T22+0800 | ✔️ | |
%GW%W%wT%H,5%Z%z | 2021W302T22,5+0800 | ✔️ | |
%GW%W%wT%H.5%Z%z | 2021W302T22.5+0800 | ✔️ | |
%GW%W%wT%H%M%Z%z | 2021W302T2220+0800 | ✔️ | |
%GW%W%wT%H%M,5%Z%z | 2021W302T2220,5+0800 | ✔️ | |
%GW%W%wT%H%M.5%Z%z | 2021W302T2220.5+0800 | ✔️ | |
%GW%W%wT%H%M%S%Z%z | 2021W302T222032+0800 | ✔️ | |
%GW%W%wT%H%M%S,%U%Z%z | 2021W302T222032,556+0800 | ✔️ | |
%GW%W%wT%H%M%S.%U%Z%z | 2021W302T222032.556+0800 | ✔️ | |
%Y%oT%H%Z%z | 2021208T22+0800 | ✔️ | |
%Y%oT%H,5%Z%z | 2021208T22,5+0800 | ✔️ | |
%Y%oT%H.5%Z%z | 2021208T22.5+0800 | ✔️ | |
%Y%oT%H%M%Z%z | 2021208T2220+0800 | ✔️ | |
%Y%oT%H%M,5%Z%z | 2021208T2220,5+0800 | ✔️ | |
%Y%oT%H%M.5%Z%z | 2021208T2220.5+0800 | ✔️ | |
%Y%oT%H%M%S%Z%z | 2021208T222032+0800 | ✔️ | |
%Y%oT%H%M%S,%U%Z%z | 2021208T222032,556+0800 | ✔️ | |
%Y%oT%H%M%S.%U%Z%z | 2021208T222032.556+0800 | ✔️ |
%C - Century
%Y - Year
%m - Month
%d - Day
%G - Week Year
%W - Week
%w - Week Day
%o - Ordinal Day
%H - Hour
%M - Minute
%S - Second
%U - Millisecond
%Z - Zone Hour including +/-
%z - Zone Minute