.

HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1 212-599-2048

Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development

Facebook Twitter YouTube
Chat now       
.
ProductsDownloadsNewsAbout usContact


Need a Domino Consultant? Call NotesMail +1 212-599-2048 - HCLSoftware Business Partner

JAVA/CORBA CLASSES


Examples: setAnyDate and setAnyTime methods
This agent sets the date component to any date, then sets the time component to any time.

import lotus.domino.*;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     DateTime dt = session.createDateTime("Today");
     dt.setNow();
     dt.setAnyDate(); // Set date part to any date
     System.out.println("Time = " + dt.getLocalTime());
     dt.setNow();
     dt.setAnyTime(); // Sets time part to any time
     System.out.println("Date = " + dt.getLocalTime());
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also