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();
}
}
}