Manage Learn to apply best practices and optimize your operations.

Date Adjustment To Weekday (Script)

This function accepts two arguments: 1) The date that you want to adjust,and 2)
The number of days you want to adjust the date by. The function is useful when
the user needs a date adjusted, but the date must be a weekday. This function
does not take into account Holidays.
Function FindWeekDay (tempdate As String, daysadjust As Integer) As String
Dim wd As Integer ' Weekday
Dim date1 As New NotesDateTime (tempdate)
date1.Adjustday(daysadjust) ' Adjust the 'date by the number of days
specified (Second 'argument).
wd = Weekday(date1.lslocaltime) ' Number for 'the day of the week.

While wd = 1 Or wd = 7 ' If the day is Sat '(7) or Sun (1)
date1.Adjustday(1) 'then increment the 'date the next Monday.
wd = Weekday(date1.lslocaltime) ' Reset 'the weekday variable

'If wd is not 1 or 7 the adjusted date is returned

FindWeekDay = date1.lslocaltime

End Function

Dig Deeper on Lotus Notes Domino User Settings



  • iSeries tutorials'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 ...