parseDate

Full name: taxi.stdlib.dates.parseDate

Signature

declare function <T> parseDate(String):T

Description

Parses a string into a date, datetime, or instant value. The target type determines which parsing rules are applied.

Supported target types are Date, DateTime, and Instant. Use @Format on the result field to control the output serialisation format.

// Parse an ISO date string into a Date value
find {
   @Format("yyyy-MM-dd")
   eventDate: Date = parseDate("2024-06-15")
}

Examples

Parses ISO date and datetime strings into their respective Taxi date types.

Try it out

Schema
Query Plan
Play with this snippet by editing it here, or edit it on Taxi Playground
Result
Query failed
Next
Welcome to Taxi