formatDate and empty string

Hi Team - this is one i should know but i can’t make it work. I have a query returning data from a database. Within that data there are dates. I use formatDate to… well, ya know, format the date. Problem is sometimes the date is empty and it returns an error because you cant format an emptystring.

I have tried functions with if, ifempty and switch. I have used “”, null and emptystring but i can’t get it to work but it continually comes back saying cant format an emptystring.

Looking at the data returned in the history it shows the date as “empty”.

Can someone point me in the right direction?

Hello @IainM nice to meet you.

Did you tried to use this function?

Don’t hesitate to contact us if you require further assistance.

//Vlad

yup. it was still generating an error on the formatDate.