Squadless
asked on
Time format JAVA
Hi,
i have a question ...
String DATE_FORMAT = "yyyy-MM-dd hh:mm:ss";
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat (DATE_FORM AT);
Calendar c1 = Calendar.getInstance();
c1.set(Integer.parseInt(cY ear), Integer.parseInt(cMonth)-1 , Integer.parseInt(cDate), Integer.parseInt(cHour), Integer.parseInt(cMinute), Integer.parseInt(cSecond)) ;
System.out.println(sdf.for mat(c1.get Time())));
the line with system out gives: 2006-10-05 08:00:11
but in reality it should be : 2006-10-05 20:00:11
How can i tell it to use military time?
Please help,
Thank you
i have a question ...
String DATE_FORMAT = "yyyy-MM-dd hh:mm:ss";
java.text.SimpleDateFormat
Calendar c1 = Calendar.getInstance();
c1.set(Integer.parseInt(cY
System.out.println(sdf.for
the line with system out gives: 2006-10-05 08:00:11
but in reality it should be : 2006-10-05 20:00:11
How can i tell it to use military time?
Please help,
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:)
ASKER