Parse date/time

Date and time Pure
Parse date/time
Text 1970-01-01T00:00:00Z
Result
Pattern yyyy-MM-dd'T'HH:mm:ss.SSSXXX

Description

Pure function parsing a string into a date/time. The pattern follows Java's DateTimeFormatter syntax; the default is ISO-8601.

When to use

Use Parse date/time to convert a date/time string received from an external source — such as an HTTP request body or an API response — into a typed datetime value that can be used with Add duration, Duration between, or Format date/time. The pattern must exactly match the string format; if the input is already ISO-8601, the default pattern works without changes.

Pins

Input pins

Pin Type Default Notes
Text string 1970-01-01T00:00:00Z The string to parse. Must conform to the specified pattern; mismatched input fails the pipeline.
Pattern string yyyy-MM-dd'T'HH:mm:ss.SSSXXX A Java DateTimeFormatter pattern matching the format of the input string.

Output pins

Pin Type Notes
Result datetime The parsed date/time value.

Example

Calculate how much time has elapsed since a timestamp in an API response. Extract the response body, convert it with Stream to string, and wire the Value output into the Text input of Parse date/time. Feed the Result output into the Start input of Duration between and wire the Result output of Now into the End input. The Result output of Duration between expresses the elapsed time, ready to log.

See also