Skip to main content
Adobe Employee
Mar 11, 2023 3:20 AM UTC
Solved

Need a variable to call in the email delivery that references the time that an email is sent

Hi Experts,

 

We are looking to set up a variable in ACS (using a content block) to deliver an email that directly references the date/time an email was sent. Is it possible to reference the send time in the email?

 

If they use JavaScript to call out the current date, if someone views the email as a web page, the code will run live and return the date/time that the user is viewing the email.

 

Thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ParthaSarathy
ParthaSarathyAccepted solution
Community Advisor
Mar 13, 2023 7:41 AM UTC

Hi @rrafiki ,

In classic, to achieve this use case we will be using the below script.

<%= formatDate(new Date(), "%2D-%2M-%4Y %2H:%2N:%2S") %> <%= formatDate(new Date(), "%2D-%2M-%4Y") %>

 

Try this in ACS, Hope it might work.

~  ParthaSarathy S

2 replies

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
Mar 13, 2023 7:41 AM UTC

Hi @rrafiki ,

In classic, to achieve this use case we will be using the below script.

<%= formatDate(new Date(), "%2D-%2M-%4Y %2H:%2N:%2S") %> <%= formatDate(new Date(), "%2D-%2M-%4Y") %>

 

Try this in ACS, Hope it might work.

Translate
~  ParthaSarathy S
Sukrity_Wadhwa
Level 4
Apr 3, 2023 10:11 PM UTC

Hi @rrafiki,

Was @parthasarathy's solution helpful to resolve your query? In case it was helpful, then kindly choose it as the 'Correct Reply'. If not and you still need more help, then do let us know.

Thanks!

Translate
Sukrity Wadhwa