Expand my Community achievements bar.

SOLVED

ACS formatDate "%4Y/%2M/%2D"

Avatar

Level 3
Level 3

I need to format a date in an email, but is not working, is this only working for adobe campaign classic and not standard? I tried formating in the query activity but didnt work, so I thought I tried in the email html body but doesnt work either,? I need to display a timestamp by removing the time so it only shows as ie. 10/08/2023

 

 

<%= formatDate(/cusmylink/lastlogindate, "%2D/%2M/%4Y") %>

 

 

update*

I came up with the following expression, but is not clean enough, isnt there an more straight forward method such as formatDate?

ToDate(Left(ToString([cusNacMemberLink/@lastlogindate]), 10))

o_X_0-1689434379896.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @o_X ,

In your query try the below expression,

ParthaSarathy_0-1689573001371.png

Day(GetDate())+'/'+Month(GetDate())+'/'+Year(GetDate())

 

Instead of GetDate(), you can use your attribute.

 

Output:

ParthaSarathy_1-1689573585530.png

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @o_X ,

In your query try the below expression,

ParthaSarathy_0-1689573001371.png

Day(GetDate())+'/'+Month(GetDate())+'/'+Year(GetDate())

 

Instead of GetDate(), you can use your attribute.

 

Output:

ParthaSarathy_1-1689573585530.png