Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next

Possible reason...

I suspect it has to do with the fact that dates internally are stored as Double.

When I declare aStart, etc as Double instead of Variant, I can see that the value for aStart and ahEnd are both 41412.4479166667, indicating to me that you have an infinite long series of 6:es, and it is rounding it.
My guess is that this is why, some kind of rounding issue deep inside the Lotusscript compiler.

I ran the code, as well as one using the NotesDateTime class, and the latter took (as you said) 10 seconds vs teh less than 1 second for the arithmetic version. This was on 100,000 comparisons each.

Assuming that you are reading the values from somewhere, I am sure that that reading will take much longer, and those 10 seconds should be negligable in the big picture, compared with teh benefit of getting the code done "the right way", IMHO.


Feedback response number WEBB97WGH2 created by ~Dan Kikiterobu on 05/21/2013

Date Comparison Mystery (~Laura Deskiski... 18.May.13)
. . Bad code (~Sean Eljumigon... 19.May.13)
. . . . aware of that (~Laura Deskiski... 19.May.13)
. . . . . . Have you profiled your code? (~Dan Kikiterobu... 20.May.13)
. . . . . . . . Yes (~Laura Deskiski... 20.May.13)
. . . . . . . . . . Possible reason... (~Dan Kikiterobu... 21.May.13)
. . . . . . . . . . . . Good thinking (~Laura Deskiski... 23.May.13)
. . Workaround found (~Laura Deskiski... 20.May.13)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS