SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package javaapplication2;
  2.  
  3. import javax.xml.datatype.XMLGregorianCalendar;
  4.  
  5. /**
  6.  *
  7.  * @author jan.mokracek
  8.  */
  9. public class JavaApplication2 {
  10.  
  11.     /**
  12.      * @param args the command line arguments
  13.      */
  14.     public static void main(String[] args) {
  15.         String date = "2019-11-20T00:00:00.000+01:00";
  16.         XMLGregorianCalendar greg = XMLGregorianCalendarUtils.stringAsCalendar(date);
  17.         System.out.println(greg);
  18.         System.out.println(XMLGregorianCalendarUtils.calendarAsString(greg));
  19.     }
  20.    
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top