Error handling / date validation in Fusion | Community
Skip to main content
lgaertner
New Participant
August 15, 2023
Question

Error handling / date validation in Fusion

  • August 15, 2023
  • 1 reply
  • 524 views

Hello,

 

I am trying to convert a string to a date using the parseDate() function. As it is possible that the incoming string is not a parseable date, I would like to prevent into getting an error. Is there any easy possibility to validate a string as being a valid date before parsing?

 

Thanks in advance.

Regards

Lars

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

ChrisStephens
New Participant
August 15, 2023

If you know what the string formatting should be, like if your string should always be YYYY-MM-DD, then you could use regex to make sure that the string matches that pattern.