Date format query

I have a field which look at a date field and depending if it exists will write "Scheduled on {Scheduled}
The formula is IF({Scheduled}>TODAY(),"Scheduled on "&{Scheduled}, “Not scheduled”),

But it writes the info as “Scheduled on 2020-03014T00:00:00+00:00”

How do I format that text field as “Scheduled on 14-03-2020”

Thanks

Use the DATETIME_FORMAT formula around the date.

DATETIME_FORMAT({Scheduled}, 'DD-MM-YYYY') 

The details are in the formula field reference.

1 Like

That worked exactly. Thanks

Hi @Luke_Ellis - I’m guessing your first date field is text/single text line, looking at the formatting in the s/s. The reason you’re getting the result you see is that you are concatenating the result of two things:

  1. DATETIME_FORMAT({BRA due}, 'DD-MM-YYYY')
  2. DATEADD({BRA due}, 3, 'months')

This is what the & operator does - joins two things together, the result being a string.

In fact, you can just do the last part of this formula to get the date in the 3 months time:

DATEADD(Date, 3, 'months')

Notice that Airtable is interpreting your initial date string as a date, which is nice too.

JB

1 Like

Thanks @JonathanBowen for your response and solution