By
Published: 16 Apr 2008
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
A user wants to know if it's possible for LotusScript to read an attachment in a Notes document without first detaching it. Find out our expert's ...
Continue Reading
Learn about different options using LotusScript code and Formula language to customize the principal field of outgoing Lotus Notes email messages.
Continue Reading
Read about merging cells in a Microsoft Word table using LotusScript and an Excel example, along with the thought process that goes along with it.
Continue Reading