Time.Parse will parse the corresponding type from a string using a template.
Timestamp.Parse("2018-02-01 01:02","yyyy-MM-dd H:m")
Date and time templates are specified by letters representing the components of a date or time.
The following patterns are supported:
|day of month|
|day of year|
|month of year (7, 07, Jul, July)|
|week based year, see java doc for more info.|
|week of week based year (1-53)|
|day of week (2, Tue, Tuesday)|
|hour of day (0-23)|
|hour of day (0-11)|
|minute of hour|
|second of minute|
|fraction of second|
|am or pm|
|escape for text (‘foo’, ‘bar’)|
When repeated, these characters indicate a minimum number of characters the string should match.
MMMparses short month names (Jan, Feb) and
MMMMparses full month names (January, February).
yyparses as the last two digits of a year with a base year of 2000 (18 parses as 2018, 95 parses as 2095).
eparses day of week (1-7),
eeeparses short week day names (Mon, Tue) and
eeeeparses full week day names (Monday, Tuesday).
Raw follows java conventions for date templates see java documentation for more info.
- ISO 8601 date:
- ISO 8601 ordinal date:
- ISO 8601 week date:
- ISO 8601 timestamp:
- RFC 1123 timestamp:
Timestamp.Parse("Wed, 09 Dec 2015 18:59:42", "eee, dd MMM yyyy H:m:s")