|
-
Dec 5th, 2006, 08:49 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Problem dealing with dates using ADO and Access 2000
I'm currently working on a project which is basically a schedule (a bit similar to Outlook Calendar), but I'm having a problems when selecting the events stored in the database.
I have a monthview control, in which I can choose different time spaces, and then display the events for those days... the problem is that I've tried different SQL queries and all of them are giving problems. I've tried using date/time fields and enclosing the dates between ## and without them, and because of some strange reason if I even try to do something simple like "SELECT * FROM tbl_events WHERE event_date > #01/01/2007#" the database returns events before that date. The closest way of getting this going as expected has been using text fields and doing something like "SELECT * FROM tbl_events WHERE event_date BETWEEN '" & date1 & "' AND '" & date2 & "'", but it gives me problems when the first date and the second one are from another month.
Any help would be greatly appreciated. Also, the dates are displayed and stored using "dd/mm/yyyy" format.
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
|