import java.text.*;
import java.util.*;
public class TIME {
public static void main(String[] args) throws ParseException {
String s = "2003-09-30 12:30:00";
Date date = new Date();
date = new SimpleDateFormat
("yyyy-MM-dd HH:mm:ss").parse (s);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
System.out.println(date);
}
}
-
Output
-
Tue Sep 30 12:30:00 SGT 2003
Why the above code have output show as above one? Is it should have output that show as below one?
-
Output I want
-
2003-09-30 12:30:00
How i make it to have Output I want?
2007-08-20
16:19:18
·
2 answers
·
asked by
scottcky1985
3
in
Computers & Internet
➔ Programming & Design