Domino Code Fragment
Code Name* TimeOnly property | Date* 04/29/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.3.17.68.14 | |
Description* This agent prints the creation time of the current database. | Type* Java | Categories* Date/Time Handling |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class timeonlyagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
AgentContext ac = s.getAgentContext();
Database db = ac.getCurrentDatabase();
DateTime createdDateTime = db.getCreated();
String sCreatedDateTime = createdDateTime.getTimeOnly();
System.out.println
("Database \"" + db.getTitle() +
"\" was created at " + sCreatedDateTime + ".");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}