One thing that has been bothering me for a long time was that DateDiff("yyyy",#12/31/2005#,#1/1/2006#) returns 1 (year!) instead of 0. After all, it's just one day and no matter how you're rounding, it should return 0.
Same result for DateDiff("yyyy",#12/31/2005#,#12/31/2006#), which is rather correct.
It merely calculates the difference between years.
Same thing happens with months.
To avoid such result, especially for tax period calculations for countries where the fiscal year does not start on January 1-st, I really avoided the datediff function wherever I could, except for days calculations, where the result is the same as Date2-Date1.
The methods of calculation were various, the presented one being just an example.
I know what you meant. I just wanted to be obnoxious, because I had a nasty day.
Sorry about that.
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
Daniel Vlas
Systems Consultant