例: setAnyDate and setAnyTime methods

次のエージェントは、日付の要素に任意の日付を設定し、続いて時刻の要素に任意の時刻を設定します。

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