number dateParse(text, pattern, timeZone, language)
Returns a timestamp in timeZone parsed from text formatted according to pattern in language.
Pattern symbols with special meaning:
Symbol | Component | Examples |
---|---|---|
G | Era | AD |
y | Year | 2014 |
M | Month | July; Jul; 07; 7 |
w | Week in year | 27 |
W | Week in month | 2 |
D | Day in year | 189 |
d | Day in month (1-31) | 10 |
E | Day of week | Tuesday; Tue; T |
F | Day of week in month (2nd Wed in July) | 2 |
H | Hour in day (0-23) | 0 |
k | Hour in day (1-24) | 24 |
K | Hour in am/pm (0-11) | 0 |
h | Hour in am/pm (1-12) | 12 |
a | Am/pm marker | PM |
m | Minute in hour | 30 |
s | Second in minute | 55 |
S | Millisecond | 978 |
Z | Time zone offset | -0800 |
z | Time zone name | Pacific Standard Time; PST; GMT-08:00 |
' | Avoid interpretation | 'day' d |
'' | Single quote | ''o'clock' |
Note! Use timeZone "UTC"
when parsing time only into an timestamp “time of day”, seconds since midnight, value as used by most blocks.
null
if parse failed.