View Single Post
  #6 (permalink)  
Old 08-01-2007, 06:48 PM
specci48's Avatar
specci48 specci48 is offline
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

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
Reply With Quote