Full Version: Issue with Test conversion
UtterAccess Discussion Forums > Microsoft® Access > Access Date + Time
bluke
I'm trying to convert date/time field ( from a CSV file thats a linked table) that is currently text to a date/time to so I can query for the Max. When on convert using CDate and then in a secondary query try to group by Max to find the most recent, it comes back with 'Type Mismatch' when I query all records, but if i limit it to find only certain groups, not Max of all groups, it returns the results just fine.

8/30/2010 12:57 PM <--this the format of the text as it comes from the CSV file

Can someone please help me?



theDBguy
Hi,

Can you verify if all the records have valid date and times in them? It sounds like some of the records might not be converting properly when you use the CDate() function. You might try something like:

IIf(IsDate([FieldName]), CDate([FieldName]), Null)

Hope that helps...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.