import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
java.util.Calendar jdt = java.util.Calendar.getInstance();
jdt.set(2005, 2, 4, 6, 7, 8);
DateTime dt = session.createDateTime(jdt);
System.out.println("Local time = " + dt.getLocalTime());
} catch(Exception e) {
e.printStackTrace();
}
}
}
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
if ((session.getInternational().isDateMDY()) &&
(session.getInternational().getDateSep().equals("/")) &&
(session.getInternational().getTimeSep().equals(":"))) {
DateTime dt = session.createDateTime("3/4/05 6:07:08");
System.out.println("Local time = " + dt.getLocalTime());
}
else
System.out.println("Date format not MDY with / and :");
} catch(Exception e) {
e.printStackTrace();
}
}
}
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");
System.out.println(dt.getLocalTime());
} catch(Exception e) {
e.printStackTrace();
}
}
}
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();
System.out.println(dt.getLocalTime());
} catch(Exception e) {
e.printStackTrace();
}
}
}
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Document doc = agentContext.getDocumentContext();
Item item = doc.getFirstItem("PurgeDate");
DateTime dt = item.getDateTimeValue();
System.out.println("Local time = " +
dt.getLocalTime() + " TZ" + dt.getTimeZone());
} catch(Exception e) {
e.printStackTrace();
}
}
}