-
1. Re: DateDiff confusion
haxtbh Nov 7, 2014 8:41 AM (in response to WolfShade)DateDiff determines the number of complete "datepart" units between the two dates. In your code you are comparing two dates formatted a different way. now() will include the time as well, which when compare to the the other date you formatted (which would have a time of midnight) has a difference between the dates of 7.5 hours (by my time). As you specified 'd' and this difference is not a full 24 hours the difference is 0.
If you do this:
#DateDiff('d',DateFormat(ndx & '-Nov-14'), DateFormat(now()) )#You would get the result you are expecting. You will be comparing like for like date formats.
-
2. Re: DateDiff confusion
WolfShade Nov 7, 2014 9:33 AM (in response to haxtbh)You can't see it, right now, but I'm facepalming myself.
I should have taken that into consideration. I'm one of the few in this dept that will trim(UPPER(query.column)) and trim(ucase(cfValue)) to make absolutely sure a match is correct, and I completely flaked on the time being appended to the date.
Thanks, haxtbh!
^_^

