Question QUESTION: Hi Ashley, I am having trouble converting a string in the format of YYYY-MM-DD into MM/DD/YYYY. I tried using the cdate function, which works well, except that I have some null records in that field. It breaks right when a date record has a null.
From what I have read, the cdate function doesn't work with null values
This is the error that I get with the cdate function when a null value appears:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'cdate'
Yes, I have tried the isnull if statement and could not get it to work. Although, i wouldn't doubt if it was a syntax issue.
Answer Hi,
Your best bet is to check if its null before trying to display it.