Text to Date
Create a date and time from the contents of a text string to a specified format.
For most standard formats, this function isn't necessary. You can pass any standard date and time text string into a date input to have it converted automatically. This function is for non-standard or ambiguous formats, for example, if the value is 2/1, that might be read as 1-Feb or 2-Jan.
Input
| Field | Definition | Type | Required |
|---|---|---|---|
|
start |
Text to be converted to a date and time value. |
Text | TRUE |
|
format |
Date format code of the input value for the start field. |
Text | FALSE |
Output
| Field | Definition | Type |
|---|---|---|
|
output |
Date object that corresponds to the start input value based on the specified format code. |
Date & Time |
Format Codes
Build the format for the date or time format that you want. Use any combination of these codes along with fixed characters, such as slashes and commas.
| format codes | output |
|---|---|
|
|
For a day number (in the month). Use |
|
|
For a single-month number. Use |
|
|
For a three-letter month abbreviation. Use |
|
|
For a four-digit year number. Use |
|
|
For the hour number (1-12). Use |
|
|
For the hour number (0-23). Use |
|
|
For the minutes. |
|
|
For the seconds. Add an |
|
|
For am or pm designation. Use |
|
|
For the time zone in offset format, for example, |
|
|
For the day of the week, where Use Use |
|
|
For a time stamp in "unix in milliseconds" format. This is defined as the count of milliseconds since Jan 1, 1970 at midnight GMT. |
|
|
For a time stamp in "unix in seconds" format, also known as the "epoch" or "unix time stamp". This is defined as the count of seconds since Jan 1, 1970 at midnight GMT. |
Examples
| start | format | output |
|---|---|---|
|
|
|
2016-02-01T00:00:00.000Z |
|
|
|
2016-01-02T00:00:00.000Z |
|
|
|
2017-04-24T16:58:36.000Z |