Hi XerVision,
there must be something wrong with your implementation of Erel's formula.
Can it be that you are doing a subtract of -1 somewhere else in your code?
Because in
Case1 (Date1 = Date2) Erel's function returns 0
Case2 (Date1 + 1 = Date2) Erel's function returns 1
Case3 (Date1 + 2 = Date2) Erel's function returns 2
And the answer of your last question:
If you try
Code:
D1 = DateParse ("08/01/2007")
D1 = D1 + 23 * cTickPerHour
D1 = D1 + 59 * cTicksPerMinute
D1 = D1 + 59 * cTicksPerSecond
D2 = D1 + cTicksPerSecond
Label1.Text= Int((D2 - D1)/cTicksPerDay)
Label1.Text is 0.
specci48