|
-
Feb 6th, 2007, 06:00 PM
#1
Thread Starter
Lively Member
Need help on my SQL statement with date criteria
I've this appl using VB.Net 2005 as front-end and MS Access as my DB. I have a table with a date field defined using the date format as "short date'. When look at it under MS Access, the data shows data in mm/dd/yyyy format (e.g. 12/23/2006"
I tried the following SQA statement to retrieve a set of records based on the following sample date range:
First attempt:
SELECT * FROM [tblWork_Order] WHERE WO_Creation_Date >= '12-15-2006' AND WO_Creation_Date <= '2-6-2007'
Then tried
SELECT * FROM [tblWork_Order] WHERE WO_Creation_Date >= '12/15/2006' AND WO_Creation_Date <= '2/6/2007'
None of them work, I got an error message "Datatype mismatched in criteria expression.
Can someone please tells me where is my problem ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|