How can I separate order date and time in Google Sheets?

Hi there, I am trying to create a flow that returns the order date and order time in separate cells but cannot find the variables to do this. Currently, the only option I am able to find is {{order.createdAt}}, but this returns a date and time in a single string, in the format YYYY-MM-DDTHH:MM:SSZ (I’m not sure what the ‘T’ and ‘Z’ mean). For example, a recent one would be 2022-05-25T15:39:40Z.

This makes it difficult to sort orders by date alone (I’m using google sheets). Is there a variable that returns ONLY the date without a time attached to it?

Thank you!

Hi @jcb10576 the Z indicates that the time is represented in UTC which is a standard default for all Shopify Liquid.

In the Shopify Flow Reference on Variables you can find all supported Liquid filters including those to manage the output of date values.

Specifically in Flow you can use date and edit the format in this way:

{{ order.createdAt | date: "%a, %b %d, %y" }}

as indicated in the Shopify Liquid dev docs and i believe what you are looking for is:

{{ order.createdAt | date: "%x" }}

Which should render date without time.