Date Codes (MM/dd/yyyy)

Substitute date and time components with their corresponding letters. Use multiple letters to represent multiple values. Wrap single-quotes around any letters in the date that should be ignored. Important: If you do not specify a time zone in your date, it will show up in local time to the DarkLight server. If you need to, use the Replace Text step to add -0000 to the end of your existing UTC date.

For Example
2001-07-04T12:08:56.235-0700 is represented as
yyyy-M-d'T'HH:mm:ss.SSSZ (RFC 822)

2017-09-12T22:51:45.600-07:00 is represented as
yyyy-M-d'T'HH:mm:ss.SSSXXX ( Note: ISO 8601 is the default and recommended pattern for DarkLight dates)

Letter Date or Time Component Examples
yy; yyyy Year 96; 1996
M; MMM; MMMM Month in year 7 or 07; Jul; July
d Day in month 10
EEE; EEEE Day in week Tue; Tuesday
a Am/pm marker PM
H Hour in day (0-23) 0
h Hour in am/pm (1-12) 12
m Minute in hour 30
s Second in minute 55
S Millisecond 978
z RFC Time zone Pacific Standard Time; PST; GMT-08:00
Z RFC 822 Time zone -0800
X; XX: XXX ISO 8601 Time zone -08; -0800; -08:00
—————– ————————- ————————
epoch Unix time in seconds 1528927247

Notes: Components that can be spelled out, like months, days, and time zone, should use the number of letters to use in the abbreviation, or 4 letters to represent the whole word. For example: M=8 or 08, MMM=Aug, MMMM=August.

  • UNIX time (epoch time) can be used as a pattern to match in the Normalize Date step by entering the word epoch

See Also: DateTimeFormatter pattern documentation

The following patterns are tried by DarkLight anywhere automatic pattern matching is used. Examples include the Normalize Date step and Reification.

  • MM/dd/yy
  • MM/dd/yy HH:mm:ss
  • yy-MM-dd HH:mm:ss
  • dd MMM yy HH:mm:ss
  • 'P' ddHHmm'Z' MMM yy
  • MMMM dd, yy HH:mm
  • E, dd MMM yy
  • dd-MMM-yy
  • yy-MM-dd
  • dd MMM yy
  • yy/MM/dd hh:mm:ss a
  • yy/MM/dd HH:mm:ss
  • dd MMM, yy
  • EEEEE MMM dd, yy HH:mm:ss
  • dd/HHmm'Z' MMM yy
  • 'R' ddHHmm'Z' MMM yy
  • EEEEE, MMMMM dd, yy hh:mm a
  • MMM yy
  • dd-MMM-yy
  • EEE MMM dd, yyyy - HH:mm:ss
  • EEE, dd MMM yy HH:mm:ss
  • EEEEE, MMMMM dd, yy
  • yyyyMMdd
  • yyMMdd HHmm
  • yyMMdd hhmm a
  • MM/dd/yy HH:mm
  • MM/dd/yy hh:mm a
  • dd-MMMM-yy HH:mm
  • dd-MMMM-yy hh:mm a
  • yyMMdd
  • EEEEE,MMMMMM dd, yyyy
  • MMMM yy
  • EEE MMM dd HH:mm:ss zzz yyyy
  • MM-dd-yyyy
  • yyyyMMdd HHmm
  • yyyyMMdd hhmm a
  • MM/dd/yyyy hh:mm:ss a
  • MMMM dd, yyyy
  • MMMM dd, yy
  • yyyy-MM-dd HH:mm:ss a
  • yyyy-MM-dd'T'HH:mm:ss.SSSXXX
  • yyyy-MM-dd'T'HH:mm:ss.SSSX
  • yyyy-MM-dd'T'HH:mm:ssX
  • yyyy-MM-dd'T'HH:mm:ss
  • yyyy-MM-dd'T'HH:mm:ssz
  • yyyy-MM-dd'T'HH:mm:ss.SSS

(Version 3.6+) Additionally, Epoch (Unix) time is also tried, and will match either millisecond versions or seconds version. Unix time matching works on numbers and numbers expressed in scientific notation.

Nerdy Note: Unix time in seconds will only match dates after March 3, 1970 (when it flipped from an 8-digit to a 9-digit number) because 8-digit numbers will be matched by the yyyyMMdd pattern first.

  • tips/dates
  • Last modified: 2018/09/12 17:49