document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import com.ibm.icu.text.DateFormat;
  2. import com.ibm.icu.text.SimpleDateFormat;
  3.  
  4. public class Main {
  5.  
  6.     public static void main(String[] args) {
  7.         Date now = new Date();
  8.         System.out.println("Date before formatted : "+now);
  9.         DateFormat df = new SimpleDateFormat("yyyy-MM-dd\'T\'HH:mm:ss.SSSZ");
  10.         //If you want another date type, you can change the pattern above
  11.         //For example:
  12.         //new SimpleDateFormat("dd/MM/yyyy");
  13.         //or
  14.         //new SimpleDateFormat("dd-MM-yyyy");
  15.  
  16.         String s = df.format(now);
  17.         System.out.println("Date with new format : "+ s);
  18.     }
  19. }
');