C (225/304)

From:Jack York
Date:25 Aug 2000 at 03:56:39
Subject:Re: Comparing Dates

Hello Colin

On 24-Aug-00, Colin Wenzel wrote:
> On 24-Aug-00, Jack York wrote:
>> Hello,
>> I am trying to compare the date a file was created with a date
>> I input. I convert the inputed date to a struct DateStamp and I

> I think it may be a math conversion / rounding problem.....

I thought that might be the case.

> I had a problem similar to this, I didn't spend a lot of time on it
> but I believe I found that only EVEN ticks work with CompareDate(),
> I don't know why, or even if that was actually the problem,
> but I just ANDED the ds_Ticks of both datestamps with 0xFFFFFFFC
>
> stamp.ds_Tick &= 0xFFFFFFFC;
>
> That round it down to the nearest 4 ticks.
>
> Or, you could just set the ds_Ticks field to 2 in both datestamps
> before comparing with CompareDates().
>
> The worst that can happen with this, is that it won't see a
> date change of less than 1 minute difference.

Aw, now you gonna make me show how truly anal rentitive I can be. :)
Well, I did actually try your second suggestion before posting and,
while it works, it doesn't provide a match for equality, which is
how I set up the program. Maybe I'll use that approach and have
"less than," "greater than" or "somewhere around" as choices. :)

Just kidding Colin. You know I always appreciate your help.

Jack