Charlotte Foust
cfoust at infostatsystems.com
Wed Jan 23 11:01:13 CST 2008
We ran into issues with our .net apps switching between SQL Server and Access backends because of date differences. There are extra milliseconds in there you can't see, so we created a routine to truncate them. Basically, we call the routine passing in a date and the function uses those values to create a new date using only the short date, hours, minutes and seconds and then passes that back. I don't know if this is the issue you're fighting, but it sure sounds like it. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos Sent: Wednesday, January 23, 2008 8:22 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Loop Until Date=Date I'm guessing that it won't test true as equal because there are some additional decimal values in the date/time field that are being rounded off that you don't see. Date/time fields are actually numeric fields with the date part left of the decimal and the time part as the decimal part stored as a fractional type of a value so chances are there are fractional values there that you aren't really looking at. Have a look at this article that explains date/time data types http://support.microsoft.com/kb/210276 GK On 1/23/08, Mark A Matte <markamatte at hotmail.com> wrote: > > Hello All, > > Thanks for the suggestions. I found last night that "DateDiff("s", RecordDT, RecordDT_end) = 0" would work...but I just can't seem to understand why they were not equal. I tried the suggestion below...but it failed as well. I also tried "If RecordDT>= RecordDT_end"...this works...but scares me because I don't know why it works and "=" does not. I think I will just use the datediff approach...but am still curious... > > > Thanks, > > Mark A. Matte -- Gary Kjos garykjos at gmail.com --