Domino Code Fragment

Code Name*
LocalTime property
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.191.5.239
Description*
3. This agent is the same as above but passes the date and time as integer values to setLocalDate and setLocalTime rather than as a string to setLocalTime.
Type*
Java
Categories*
Date/Time Handling
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
import lotus.notes.*;


public class localtimeset2agent extends AgentBase
{
 public void NotesMain()
 {
   try
   {
     Session s = getSession();
     DateTime dt = s.createDateTime("");
     dt.setLocalDate(1997, 12, 12, true);
     dt.setLocalTime(1, 30, 0, 0);
     System.out.println(dt.getLocalTime());
     System.out.println(dt.getGMTTime());
   }
   catch (Exception e)
   {
     e.printStackTrace();
   }
 }
}