Skip to content

Parse Date

Parse and format date values for use with Last Mile Intelligence.

parseDate

transformations

ParameterTypeRequiredDefaultDescription
Date ValuestringYes-Date string to parse
Input FormatstringNoautoExpected input format (auto, ISO, US, EU)
Output FormatstringNoISODesired output format
TimezonestringNoUTCTarget timezone
PatternExample
ISO2024-06-21T10:30:00Z
US06/21/2024
EU21/06/2024
timestamp1718962200
{
"success": true,
"parsed": {
"iso": "2024-06-21T10:30:00.000Z",
"timestamp": 1718962200,
"formatted": "June 21, 2024",
"timezone": "UTC",
"date": "2024-06-21",
"time": "10:30:00"
}
}
{
"success": false,
"error": "Unable to parse date",
"input": "not-a-date",
"format": "auto"
}
  • Invalid Date: Date string cannot be parsed
  • Invalid Format: Specified format pattern is not supported
  • Invalid Timezone: Timezone identifier not recognized
  • Ambiguous Date: Date could be interpreted multiple ways