bmel:to-timestamp¶
Category: Type Conversion · Returns: bmel:datetime
Signature
bmel:to-timestamp(expr: bmel:any)
Description¶
Converts the expression to a datetime value. For strings, auto-detects and parses common ISO-8601 date-time formats (e.g. '2026-03-05T14:30:00Z'). Numbers are treated as Unix epoch milliseconds. Datetimes are returned as-is.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
expr | bmel:any | The value to convert to a datetime. Accepts an ISO-8601 date-time string, epoch-millis number, or datetime. |
Examples¶
Datetime from an ISO-8601 string
bmel:to-timestamp({createOrder:Request Payload}.$.created_at)
Datetime from epoch milliseconds
bmel:to-timestamp({invokeAgent:Response Payload}.$.created_ms)
Hour of a timestamp sent as text
bmel:hour(bmel:to-timestamp({createOrder:Request Payload}.$.created_at))