Home > Ask the Domino Experts > LotusScript Questions & Answers > Modifying LotusScript code for date and time handling
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Modifying LotusScript code for date and time handling

Cregg Hardwick EXPERT RESPONSE FROM: Cregg Hardwick

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 18 April 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?

>
EXPERT RESPONSE
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


  • Sound Off! -   Be the first to post a message to Sound Off!


    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    LotusScript
    Use DXL utilities for advanced replication settings in Notes
    Use LotusScript to create encrypted replicas
    Write a LotusScript agent to automate file attachments
    Troubleshooting a scheduled agent not running on a Global Notes Architecture (GNA) server
    Setting up local replication of a Lotus Notes database for offline employees
    Creating a link on an HTML page to a Microsoft Word attachment in a Lotus Notes database
    LotusScript to extract and move attachments to a Lotus Notes mailbox or file folder
    Copying a rich-text field with attachments to a Lotus Notes document
    How to convert Lotus Notes documents to .PDF files
    Can I stop Lotus Domino Server from transforming embedded images into attachments?

    LotusScript
    LotusScript equivalent of @Picklist for Lotus Notes
    Launch large attachments within an email from a Notes database
    How to find files on a hard drive or mapped network with LotusScript
    Update the ACL from the Roles view with LotusScript
    LotusScript agent moves tagged spam email to junk mail folder
    Set a value in a field existing in another Lotus Notes database
    Create an automatic scheduled view export in Excel
    Top 10 LotusScript tips
    Create a personalized greeting for Lotus Notes database users
    Fail-safe rich-text validation using LotusScript

    Lotus Domino Designer
    Set a value in a field existing in another Lotus Notes database
    Display Lotus Notes fields as separate entries in one column
    An introduction to Lotus Domino Designer
    Creating custom Lotus Notes Domino login forms
    Using LotusScript to retrieve names of fields on a Lotus Notes form
    Top 10 Lotus Notes Domino programming and development tips of 2007
    A bevy of Notes/Domino development tips
    A smorgasbord of Notes/Domino development tips
    Lotus Notes' document check-in/check-out functionality
    Importing data from Microsoft Excel to a Lotus Notes form

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary



    Search and Browse the Expert Answer Center
    Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
    Browse our Expert Advice

    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts