Signup

How to change the date and time format in email notifications

You can modify the format of the pickup/delivery/shipping date and time in your email notifications by adding some code to your templates.


You might want to make a backup of your current email templates before making any changes.


TABLE OF CONTENTS


Changing the date format


1. In your Shopify Settings go to Notifications, then open the email template you would like to modify e.g. the Order Confirmation.


 


2. Find the following liquid variable that shows the customer's pickup date:


{{ attributes.Pickup-Date }}




3. Replace the above code with the following line: 


{{ attributes.Pickup-Date | date: "%A, %-d %B %Y" }}


4. Use strftime.net to get your preferred date format, e.g. %d/%m/%Y will display the date in DD/MM/YYYY format.


5. Replace the code between the quote marks " " with your preferred date format.


6. Repeat these steps on the liquid variables for the local delivery and shipping dates as required. A full list of available liquid variables for Store Pickup + Delivery can be found in our Liquid variable reference guide.


Local Delivery date:

{{ attributes.Delivery-Date }}


Shipping date:

{{ attributes.Shipping-Date }}


Changing the time format from 24h to 12h (military to standard)


1. In your Shopify Settings go to Notifications, then open the email template you would like to modify e.g. the Order Confirmation.


2. Find the following liquid variable that shows the customer's pickup time:


{{ attributes.Pickup-Time }}



3. Replace this code with the following line:


{{ attributes.Pickup-Time | date: "%r" }}

4. The small letter 'r' will format the time to appear in 12h. To make it appear in 24h, the capital 'R' is used instead.


5. Repeat these steps on the liquid variables for the local delivery time as required. A full list of available liquid variables for Store Pickup + Delivery can be found in our Liquid variable reference guide.



B
Boglarka is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.