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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top