Help

Parse a date if exists, otherwise blank

Topic Labels: Formulas
Solved
Jump to Solution
604 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Emily_McLain
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello! I'm sure there is a very easy solution for this but I am having trouble figuring it out! 

I have an "Ad Record" field that may or may not have a date at the start (ex. "1/2/23 | Company | Product"). This formula parses out the date for me easily enough:

 

DATETIME_PARSE({Ad Record},'MM/DD/YYYY')

 

However, sometimes there may not be a date (ex. "Company+") so the above formula parses an ERROR. What sort of IF statement would work here to instead leave the field empty?

This didn't work for me:

 

IF({Ad Record}, DATETIME_PARSE({Ad Record},'MM/DD/YYYY'), "")

 

 

 

Thank you! 

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Could you try the following?

IF(
  ISERROR(DATETIME_PARSE({Ad Record},'MM/DD/YYYY')) != 1,
  DATETIME_PARSE({Ad Record},'MM/DD/YYYY')
)

Screenshot 2023-02-24 at 3.55.08 PM.png

See Solution in Thread

2 Replies 2
TheTimeSavingCo
18 - Pluto
18 - Pluto

Could you try the following?

IF(
  ISERROR(DATETIME_PARSE({Ad Record},'MM/DD/YYYY')) != 1,
  DATETIME_PARSE({Ad Record},'MM/DD/YYYY')
)

Screenshot 2023-02-24 at 3.55.08 PM.png

Emily_McLain
5 - Automation Enthusiast
5 - Automation Enthusiast

That worked! I knew it would be something simple.

Thank you so much!