Skip to main content

Hei guys 
that’s my first question to the comunity hope you can help. So I ve a doubt that I m not able to solve. 

I m using an external no code platform from which I m taking data as Customer Property into Klavyio. My company is working on the telemedicine and I ask patient to book doctor appointments.

Example is: 
Patient is booking a slot time and then I want to confirm him/her that his booking is confirmed (same day email) and I want to remember them at a later time that he will have the visit. 

I m taking data from the app and specifically I am grasping the slot time and the date picked by the patient.

The date is coming as follows: MM/DD/YYYY HH:MM:SS am/pm

Now I am able to transfer this info in Klavyio and I am able to write this data also in as a customization in the email I ll send them. As you can imagine this is not optimal. How can I compress the data into only MM/DD/YYYY?

Hi @Gb1996, welcome to the community!

Within Klaviyo templates, you can use something called “Filters” which lets you do some basic string manipulation for a given variable such as your custom property for the booking slot time. There’s a specific Filter called “format_date_string” that does exactly that, take one format of a Date and converts it to another.

Here’s an example you can try:

{{ your_variable|format_date_string|date:'n/j/y' }}

This should present the date in a m/dd/yy format.

You can see other options or learn more about the date format filter in this documentation:

Hope this helps and let us know if it worked!


Heiiii it worked perfectly! 
Thank you so much for the quick response 🙂 You are the best


I ve an additional question to that. 
How do I make it in another language that “march”? I would love to place the italian language there :) 
 

 


Hey @Gb1996 

One idea would be to build in an if/else statement I.E. if March, then nItalian version]. Alternatively, you could also just have that date come through as a text format with the italian version already written out to reference.


Reply