Problem solve Get help with specific problems with your technologies, process and projects.

Modifying LotusScript code for date and time handling

Discover some LotusScript code that can be implemented to forward Lotus Notes email messages at specific times.

I've created several helpful email-forwarding scripts, but I want to tweak one. I'd like to test date and time handling by having email forward only between certain times and dates. Is there a simple way to do this?
You can LotusScript similar to the following:
Dim RightNow as new NotesDateTime("Now")
Dim StartTime as new NotesDateTime
("01/01/2001 08:00:00 AM")
Dim EndTime as new NotesDateTime
("01/01/2001 05:00:00 PM")

If RightNow>StartTime and 
RifghtNow<EndTime then
   ' send mail
End if

For more information on using the LotusScript DateTime class, consult the Domino Designer help.

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from

  • Tip: Verifying user's date setting and time zone on local PC
  • Tutorial: 30 LotusScript tips
  • Reference Center: LotusScript tips and advice
  • Dig Deeper on LotusScript

    • Favorite iSeries cheat sheets

      Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...