Convert #Error to Null or something else.

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a text field that was imported, that is suppose to contain date
values. I've used the CDate function to convert these text values to
date values, but some of them are not a recognizable date formats, so
Access uses #Error for these. Is there a way to use an expression that
will display these #Error values as Null, or something other than
#Error?

Thanks,

Dave
 
Try using IIF and ISDate in the query

GoodDate: IIF(IsDate([TextField]),CDate([TextField]),Null)
 
Back
Top