Parse Date
Parse and format date values for use with Last Mile Intelligence.
Operation
Section titled “Operation”parseDate
Resource
Section titled “Resource”transformations
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Date Value | string | Yes | - | Date string to parse |
| Input Format | string | No | auto | Expected input format (auto, ISO, US, EU) |
| Output Format | string | No | ISO | Desired output format |
| Timezone | string | No | UTC | Target timezone |
Common Format Patterns
Section titled “Common Format Patterns”| Pattern | Example |
|---|---|
| ISO | 2024-06-21T10:30:00Z |
| US | 06/21/2024 |
| EU | 21/06/2024 |
| timestamp | 1718962200 |
Response
Section titled “Response”Success
Section titled “Success”{ "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"}Error Handling
Section titled “Error Handling”- 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