Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fs
//Title of this code //'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_45 import java.util.*; import java.lang.*; import java.text.SimpleDateFormat; class Rextester { public static void main(String args[]) { System.out.println("START"); //Date myDate = new Date(); Date myDate = new Date(); String[] formats = new String[] { "yyyyMMdd", "yyyy-MM-dd", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mmZ", "yyyy-MM-dd HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSSZ", }; for (String format : formats) { SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.US); System.out.format("%30s %s\n", format, sdf.format(myDate)); //sdf.setTimeZone(TimeZone.getTimeZone("UTC")); //System.out.format("%30s %s\n", format, sdf.format(myDate)); } //Simple System.out.println("\n" + new SimpleDateFormat("yyyy-MM-dd",Locale.US).format("1530676800000")); System.out.println("END"); } }
run
|
edit
|
history
|
help
0
Java messing around
JAVA # DİZİ İLE EN BÜYÜK BULMA
Ways to form Max Heap
Display Page (Pagination)
Find merge point of two linkedlists - solution 1
Compiler
Aaina
sortArraymerge
true false
LambdaExpression