I just ran accross a problem in one of my databases that I wasn't aware of until just now. It is probably just because of my own short sightedness but I thought I would pass along the information for those of you who are unaware of the same sort of situation.
I generate several reports out of a database that is the front-end to an SQL server backend. The date fields on the SQL server have time stamps as part of the date/time field (12/1/2003 12:00:21 PM). Alot of the reporting that is done is using date ranges and I use BETWEEN two different dates to get my results. What I wasn't aware of was that when using BETWEEN and there is a time stamp on the date, anything with the 'to date' that has a time stamp will not be included.
Example:
Between #7/1/2002# and #11/24/2003# will only result in data between 7/1/2002 and 11/23/2003 since all of the dates have the time stamp.
I was not aware of this 'little' problem in my program and now have to go back and rework the code to reformat the date field but I thought that I would pass along my error so others would not make the same mistake.
[flush]
DBAMJA
It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
I generate several reports out of a database that is the front-end to an SQL server backend. The date fields on the SQL server have time stamps as part of the date/time field (12/1/2003 12:00:21 PM). Alot of the reporting that is done is using date ranges and I use BETWEEN two different dates to get my results. What I wasn't aware of was that when using BETWEEN and there is a time stamp on the date, anything with the 'to date' that has a time stamp will not be included.
Example:
Between #7/1/2002# and #11/24/2003# will only result in data between 7/1/2002 and 11/23/2003 since all of the dates have the time stamp.
I was not aware of this 'little' problem in my program and now have to go back and rework the code to reformat the date field but I thought that I would pass along my error so others would not make the same mistake.
[flush]
DBAMJA
It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.