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
Subject: Date Comparison Mystery
Feedback Type: Problem
Product Area: Designer Client
Technical Area: Application development
Platform: ALL
Release: All
Reproducible: Always

I start with two date/times and adjust one to become equal to the other by using TimeNumber to add 15 minutes to the LotusScript Date variable.

How can ahEnd be greater than aStart? Run the code and see!


Dim aStart, aEnd, ahStart, ahEnd

aStart = CDat("18/05/2013 10:45:00 AM")
aEnd = CDat("8/05/2013 11:00:00 AM")

ahStart = CDat("18/05/2013 10:15 AM")
ahEnd = ahStart + TimeNumber (0, 30, 0)

If(ahEnd > aStart) Then
MsgBox ahEnd & " is greater than " & aStart & " ?? Incorrect!"
Else
MsgBox ahEnd & " is NOT greater than " & aStart & ". Correct!"
End If


Feedback number WEBB97THCC created by ~Laura Deskiskioden on 05/18/2013

Status: Open
Comments:

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