Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date field containg errors

Status
Not open for further replies.

cfriedberg2

Programmer
Aug 13, 2005
34
US
Field1 NewDate
Company Rep: #Error
#Error
Rosauers #Error
38864 5/27/2006
38857 5/20/2006
38850 5/13/2006
38843 5/6/2006
38808 4/1/2006
38777 3/1/2006
#Error

I have a sample query containing the following data. It is data from an Excel worksheet. Field1 is the actual data from the sheet. NewDate is the conversion of the numbers into actual dates. Now, Just how do I extract only the records having dates? I have used the following query

SELECT DateQuery.Field1, DateQuery.NewDate
FROM DateQuery
WHERE IsDate(NewDate);

The error message is "Data type mismatch in criteria expression." Is there a way to display only the records that contain the dates?
 
Perhaps this ?
SELECT DateQuery.Field1, DateQuery.NewDate
FROM DateQuery
WHERE IsNumeric(Field1);

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top