# datetime in email

**URL:** <https://community.hubspot.com/t/datetime-in-email/129757>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [April 11, 2025, 11:32am UTC](https://community.hubspot.com/t/datetime-in-email/129757 "2025-04-11T11:32:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DANFROY](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@DANFROY](https://community.hubspot.com/u/DANFROY)\
**Post date:** [April 11, 2025, 11:32am UTC](https://community.hubspot.com/t/datetime-in-email/129757/1 "2025-04-11T11:32:05Z")

</div>

**Hello everyone,**

I need to modify how a date is displayed in an email using a date-time variable.  
I’m using the following line, but nothing is being displayed:

{{ contact.rdv\_cp | format\_datetime(“dd/MM/yyyy HH:mm:ss”) }}

Has anyone encountered this issue before?  
Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [April 11, 2025, 8:34pm UTC](https://community.hubspot.com/t/datetime-in-email/129757/2 "2025-04-11T20:34:18Z")

</div>

Hey, @DANFROY 👋 One thing to check — are you using a HubL filter or function? It’s an important distinction as “You can apply HubL filters to personalization tokens, such as contact and company tokens, on HubSpot CMS and blog pages, but _ **not in emails** _.” — [source](https://developers.hubspot.com/docs/reference/cms/hubl/filters#format_datetime:~:text=You%20can%20apply,not%20in%20emails.)

Have you tried something like this?

`{{ format_datetime(contact.rdv_cp, "dd/MM/yyyy HH:mm:ss", local_time_zone) }}`

which uses the HubL filter `[**format\_datetime**](https://developers.hubspot.com/docs/reference/cms/hubl/functions#format_datetime)` instead?

Talk soon! — Jaycee

---

<div class="post-metadata">

**Author:** ![DANFROY](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@DANFROY](https://community.hubspot.com/u/DANFROY)\
**Post date:** [April 12, 2025, 7:54am UTC](https://community.hubspot.com/t/datetime-in-email/129757/3 "2025-04-12T07:54:50Z")

</div>

Voici la traduction en anglais :

* * *

Hello, and thank you very much for taking the time to respond.

Unfortunately, it seems that it’s not possible to use Hubl with custom variables in emails, only on landing pages.
