Apr 23, 2022 04:39 AM
Hello All,
I am new to Airtable & have searched but could not find a solution to my query.
My table has the following fields (and a couple of more).
5 days before the due date, I send myself a reminder mail.
And, this seems to be fine (preview tells me it is fine).
The issue is the format of the due date.
I want the format to be 22-Jul-2022 but the email shows 2022-07-22
I used the formula in the email, but it is treated as text in the email.
I created another field (column) with my kind of format and the column shows the format, but when I reference this column in my email, the content is blank.
Can you please help me?
Best,
Vikas
Apr 23, 2022 09:45 PM
Hey @Vikas!
Welcome in!
So, one way to handle this is to create a formula field that formats your date value.
In this case, you’ll want to use the DATETIME_FORMAT
function.
You can use this format as an example:
DATETIME_FORMAT(
{Date Field},
'D-MMM-YYYY'
)
This will provide you a value in your desired format of: 22-Jul-2022
.
You’ll use that formula field to plug into your email/automation, instead of your original date/time field.
If I remember correctly, this formula will produce a string data type, rather than a date data type.
This means that Airtable will not transform the data when it goes through an automation, which is what was causing your original issue.
The DATETIME_FORMAT
function is my best friend.
If you want to play around with the formatting, here is a link to the formatting options.
Please let me know if something breaks, if I’m wrong, or if you have any additional questions!
May 14, 2024 02:32 AM
I tried this solve, however, I'm experiencing the same challenges as the original poster where even after creating the second field with the text string formula, when I try to reference that field using a dynamic field in my automation email it returns a blank value (i.e. nothing).