例: DateOnly property

次のエージェントは、現在のデータベースの作成日付を出力します。

import lotus.domino.*;
public class JavaAgent extends AgentBase {
  public void NotesMain() {
    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();
      // (Your code goes here) 
      Database db = agentContext.getCurrentDatabase();
      DateTime createdDateTime = db.getCreated();
      String sCreatedDate = createdDateTime.getDateOnly();
      System.out.println
      ("Database ¥"" + db.getTitle() +
      "¥" was created on " + sCreatedDate + ".");
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}