Can someone please help me with this neverending date problem in Access.
Dates are stored as mm/dd/yyyy time:min:sec.
I have a daterange search that retrieves records from 'fromDate' and to 'toDate'. 'fromDate' and 'toDate' are only day, month, and year.
The search works fine if 'fromDate' and 'toDate' are different, but if they are the same (user only want records from one particular date), then it doesn't retrieve any records. This is part of my query:
"DateCreated >= #" & fromDate & "# AND DateCreated <= #" & toDate & "# "
The reason is probably because dates are stored with the time as well. Then, DateCreated will never be equal to 'fromDate'. How can I handle this? I do not really have to store time in DB, but that seems to be necessary in access??!
Can someone please help me with this.
Appreciated
Dates are stored as mm/dd/yyyy time:min:sec.
I have a daterange search that retrieves records from 'fromDate' and to 'toDate'. 'fromDate' and 'toDate' are only day, month, and year.
The search works fine if 'fromDate' and 'toDate' are different, but if they are the same (user only want records from one particular date), then it doesn't retrieve any records. This is part of my query:
"DateCreated >= #" & fromDate & "# AND DateCreated <= #" & toDate & "# "
The reason is probably because dates are stored with the time as well. Then, DateCreated will never be equal to 'fromDate'. How can I handle this? I do not really have to store time in DB, but that seems to be necessary in access??!
Can someone please help me with this.
Appreciated