Possible Duplicate:
How can I calculate a time span in Java and format the output?
How to subtract two time by converting them to get long and convert it back to time again?
I tried subtracting two time by converting them to long.
Long timeSpan = Long.valueOf(timespan.getValue().toString()) * 60;
Long checkVar = (date.getTime() - testStartTime.getTime()) / 1000;
Now how do i convert the resultant long into time?
That is if the result long is say 30 min i want it to be shown 00:30:00 .
How can i do this?
Thanks in advance