Help

Re: Using date time parse formula that includes a time range

Solved
Jump to Solution
2309 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Sara_Ophoff
6 - Interface Innovator
6 - Interface Innovator

Hello - I am trying to utilize a formula to view a date that is formatted like this Tue Aug 23, 2022 3pm - 3:30pm as 08/23/2022. (I do not need the time range in the final view)

I was trying to do a formula like this: DATETIME_FORMAT(DATETIME_PARSE({Formula},“DDD MMM DD, YYYY”), “MMM-DD-YYYY”) but I am just getting an error in return

Screen Shot 2022-08-22 at 9.09.17 AM

Am I wildly off? Any help would be greatly appreciated! I am super new to formulas.

1 Solution

Accepted Solutions

Oh sorry bout that! I didn’t notice the “-” in the time :slightly_smiling_face:

This should work

DATETIME_PARSE(LEFT(Formula, FIND("-",Formula)-2), "MMM-DD-YYYY")

See Solution in Thread

7 Replies 7

Hi @Sara_Ophoff ,

Welcome to Airtable Community!

I have tested your formula and the problem is the “Tue” in the start of the text. If you removed it then it works fine.

You can use this instead

DATETIME_PARSE(RIGHT(Formula,LEN(Formula)-4), "MMM-DD-YYYY")

Hello Mohamed - thank you for the super quick reply! I was able to get ride of the Tue (thank you for pointing that out), but I am still getting an error on my end.

Screen Shot 2022-08-22 at 9.30.44 AM

Not sure why it still won’t spit out the date!

No worries Sara , my pleasure!

You got rid of the day name in the Formula already, so you dont need the RIGHT() and LEN() parts. You can just do DATETIME_PARSE(Formula, "MMM-DD-YYYY")

AH! Yes, thank you again - ok, getting SO CLOSE @Mohamed_Swellam

Now… it IS giving me a date (YES!), but it’s the wrong date.

It looks like it sending me the MONTH correctly but somehow using the TIME RANGE as the other two data points (DATE and YEAR).

Is there something I could add to the formula to essentially say, don’t look at the time range?

Screen Shot 2022-08-22 at 9.42.20 AM

Oh sorry bout that! I didn’t notice the “-” in the time :slightly_smiling_face:

This should work

DATETIME_PARSE(LEFT(Formula, FIND("-",Formula)-2), "MMM-DD-YYYY")
Sara_Ophoff
6 - Interface Innovator
6 - Interface Innovator

@Mohamed_Swellam THANK YOU! It worked! Appreciate your help!!

Always my pleasure ! Kindly mark it as Solved :slightly_smiling_face: