Hi all ,
I'd really appreciate an insight on this ..
i am trying to subtract two date values
dateS = "06:03:00"
dateE = "06:00:00"
SimpleDateFormat timeFormat = new SimpleDateFormat("hh:mm:ss");
timeFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
java.util.Date dateStart = timeFormat.parse(dateS);
java.util.Date dateEnd = timeFormat.parse(dateE);
long diff = dateStart.getTime() - dateEnd.getTime();
return timeFormat.format(new Date(diff));
06:03:00 - 06:00:00 = 12:03:00 WHY ? I want my answer to be 00:03:00
Thanks alot
2006-11-15
15:43:40
·
5 answers
·
asked by
Amber G
1
in
Computers & Internet
➔ Programming & Design