Skip to content
Log in

datetime - Liquid Filter Reference

On this page

Description

Converts a date/time string to a valid timestamp

Property Value
Return Type string
Category dates

Options

Option Description
timezone Converts a timestamp to the given timezone

Examples

liquid {{ "2021-02-01T09:00:00" | datetime }}

Output: 2021-02-01T09:00:00Z

liquid {{ "2021-06-01 09:00" | datetime: timezone: "Australia/Sydney" }}

Output: 2021-05-31T23:00:00Z

Was this article helpful?

Was this article helpful?