Help

Re: Date format query

1173 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_Mein
4 - Data Explorer
4 - Data Explorer

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

4 Replies 4

Use the DATETIME_FORMAT formula around the date.

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

The details are in the formula field reference.

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')

Screenshot 2020-03-13 at 16.48.08

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

JB

Luke_Ellis
4 - Data Explorer
4 - Data Explorer

Thanks @JonathanBowen for your response and solution