Skip to content

#formatDateTime

Formats a date and time string using the provided format string.

#formatDateTime(value, format)
Category Dates and timesValid in Property value
Name Type Description
value path | string A date and time.
format string A .NET date format string, such as yyyy-MM-dd.

string

source.json
{
"when": "2026-01-15T10:30:00"
}
transformer.json
{
"result": "#formatDateTime($.when, 'yyyy-MM-dd')"
}
output.json
{
"result": "2026-01-15"
}

Try it in the playground →

#parseDateTime