Q
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")
StartTime.SetAnyDate=true;
Dim EndTime as new NotesDateTime
("01/01/2001 05:00:00 PM")
EndTime.SetAnyDate=true;

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 SearchDomino.com:

  • 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

    Have a question for an expert?

    Please add a title for your question

    Get answers from a TechTarget expert on whatever's puzzling you.

    You will be able to add details on the next page.

    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