Exported Dates & Dates In Liquid Templates

Custom Fields stores dates as Unix Timestamps for the most flexibility. 

When viewing exported dates the format appears as a series of numbers, for example, 1598897164 evaluates to August 31, 2020 when converted. 

Converting Dates In Spreadsheets

A Unix timestamp can be converted into any date format. From within a spreadsheet, a calculation must be performed. If the date is stored in cell A1, the formula would be  =A1 / 86400 + 25569  With the calculation in place, the resulting number can then have any date format applied to it from within the spreadsheet program.  

Dates In Liquid Templates

Dates stored in Custom Fields can be displayed in any format you'd like in your theme templates. 


{{ product.metafields.custom_fields['my_field'] | date: "%Y-%m-%d %H:%M" }}

Would evaluate to 2020-08-31 17:48.

See also https://shopify.github.io/liquid/filters/date/