aziz rasul
Active member
- Local time
- Today, 23:59
- Joined
- Jun 26, 2000
- Messages
- 1,935
Here's the problem.
If I use DateDiff(“yyyy”,#31/12/02#,#01/01/04#) I get the value of 2, even though there has only really been a complete year gap of 1 year.
However, if I use
1 Mod DateDiff(“yyyy”,#31/12/02#,#01/01/04#), I get the answer of 1 which is what I wanted.
What I am trying to understand is, that according to online help, 1 Mod 2 should give a remainder of 0 NOT 1?
When I initially tried DateDiff(“yyyy”,#31/12/02#,#01/01/04#) Mod 1 (which is the way that I expected it to work) I got 0?
What am I missing here?
If I use DateDiff(“yyyy”,#31/12/02#,#01/01/04#) I get the value of 2, even though there has only really been a complete year gap of 1 year.
However, if I use
1 Mod DateDiff(“yyyy”,#31/12/02#,#01/01/04#), I get the answer of 1 which is what I wanted.
What I am trying to understand is, that according to online help, 1 Mod 2 should give a remainder of 0 NOT 1?
When I initially tried DateDiff(“yyyy”,#31/12/02#,#01/01/04#) Mod 1 (which is the way that I expected it to work) I got 0?
What am I missing here?