Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

LocalDateTime to XMLGregorianCalendar

LocalDateTime localDatetime = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");

String formattedDate = localDatetime.format(formatter);
XMLGregorianCalendar calendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(formattedDate);
 
PREVIOUS NEXT
Tagged: #LocalDateTime #XMLGregorianCalendar
ADD COMMENT
Topic
Name
7+8 =