Date/Time Key Elements
The key elements of the Date/Time format include:
|
Component |
Format |
|
Year |
yyyy |
|
Month |
MM |
|
Month as an abbreviation |
MMM |
|
Day |
dd |
|
Hour (24-hour clock) |
HH |
|
Minute |
mm |
|
Second |
ss |
|
Hour (12-hour clock; a.m./p.m.) |
tt |
|
Millisecond |
SSS |
|
Microsecond |
SSSSSS |
|
Nanosecond |
SSSSSSSSS |
|
Space/separator (required if time is specified) |
'T' |
|
Zulu (Greenwich Mean Time) |
'Z' |
|
Time zone (ISO 8601 time zone) |
X |
|
UNIX Epoch time |
POSIX |
|
Milliseconds since UNIX Epoch time |
POSIXMILLIS |
|
NOTE |
To parse and format times with higher than millisecond precision, the format string needs to end with a period followed by sequence of upper case S. There can be no additional characters following them. For example: yyyy-MM-dd HH:mm:ss.SSSSSS
|


