Receipt - how to show exact date & time of transaction?

Tourist
18 0 1

In the receipt template, I see 

 

          {{ "now" | date: "%m/%d/%y" }}<br />

This outputs "02/11/19". So far, so good.

 

 

However, the "now" object changes this timestamp if the page is reloaded. I don't want it to show the *current* date on the receipt, but the actual date of the transaction.

 

Trying to use the "created_at" object, getting a blank output.

Also trying to add the hours in AM/PM format, also getting nowhere.

 

1.) Why isn't "created_at" doing anything?

2.) How can I make it output the actual transaction timestamp, and add the time, in the format "02/11/2019 10:32 AM"?

 

Advice and code examples would be much appreciated!

0 Likes
Shopify Partner
460 23 49

Hey Nathan,

 

Have you tried to test the email by placing a test order so it goes through the full flow? created_at is definitely blank and wont work in preview mode as well as test emails.

CTO, Co-founder of nemo.ai
0 Likes
Highlighted
Shopify Expert
9542 28 1310

Let's start with seeing the actual code you have in place. You have given us one using "now" but not the one you want to use.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes