Skip to main content
Solved

Using date time parse formula that includes a time range

  • August 22, 2022
  • 7 replies
  • 44 views

Forum|alt.badge.img+5

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

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

Best answer by Mohamed_Swella1

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?


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

7 replies

Mohamed_Swella1
Forum|alt.badge.img+17

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

Forum|alt.badge.img+5
  • Author
  • Known Participant
  • August 22, 2022

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.

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


Mohamed_Swella1
Forum|alt.badge.img+17

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.

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


Forum|alt.badge.img+5
  • Author
  • Known Participant
  • August 22, 2022

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?


Mohamed_Swella1
Forum|alt.badge.img+17

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?


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

Forum|alt.badge.img+5
  • Author
  • Known Participant
  • August 22, 2022

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


Mohamed_Swella1
Forum|alt.badge.img+17

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


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