Manage Learn to apply best practices and optimize your operations.

Deterimine If A Date Is Within A Daterange

Here is an easy way to determine of a NoteDateTime value falls within a
NotesDateRange.
Function IsInDateRange( StartDT As NotesDateTime, EndDT As NotesDateTime,
dtval As NotesDateTime)
Dim diffstart As Long
Dim diffend As Long
Dim range As Long

range = enddt.TimeDifference(startdt)
diffstart = dtval.TimeDifference(startdt)
diffend = dtval.TimeDifference(enddt)

If range < 0 Then
Msgbox "Invalid Date Range"
IsInDateRange = False
End
End If

If diffstart > 0 Then
If diffend < 0 Then
Msgbox dtval.LocalTime &" is IN the specified rage"
IsInDateRage = True
Elseif diffend > 0 Then
Msgbox dtval.LocalTime &" is AFTER the specified rage"
IsInDateRage = False
End If
Elseif diffstart < 0 Then
Msgbox dtval.LocalTime &" is BEFORE the specified rage"
IsInDateRage = False
End If

End Function

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close