Use date field from object to obtain the day of the week and show on mail

Hi, I’m creating an email template to send to my customers when the deal’s arrival date is close. In my deal object, I have a property called ‘Arrival Date,’ and I want to obtain the day of the week for that date to include in the email content.

I used the code from this link, but when I replace the fixed date with deal.arrival_date, the code doesn’t display anything.

I printed the arrival_date, and it shows as a string, so I tried converting it into a date object, but nothing seems to work.

Is there a workaround for this? Is it not possible to do this in email templates?

Hi @MVirginiaBarr and welcome!
We are delighted to have you here!
Great question, thanks for asking the Community!
I have found similar threads that might help you:
- The solution from @Expertopinionsa on this post “String date to date property in automation/workflow with custom code
- The solution from @Bortami on this post “Custom Code to change Date/Time stamp to Date
I hope this helps!
Have a lovely day and a great week ahead!
Best,
Bérangère