Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26295

How to display in HH:MM:SS... ?

Newsgroups comp.lang.java.programmer
Date 2013-10-10 10:58 -0700
Message-ID <c40d8b94-ebd9-43e4-be96-4bfbb8bb69eb@googlegroups.com> (permalink)
Subject How to display in HH:MM:SS... ?
From abhilash.androiddeveloper@gmail.com

Show all headers | View raw


Hi,

I am having two dates with times for example:

                String dateStart = "01/14/2012 09:30:55";
		String dateStop = "01/15/2012 18:25:54";

SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
	 
		Date d1 = null;
		Date d2 = null;
	 
			d1 = format.parse(dateStart);
			d2 = format.parse(dateStop);

When I subtract:  d2 - d1, I want to show the ela[sed time in between the above two dates in the format in HH:MM:SS: like i want the output something like: 
33:05:01. How can I get in that format..? If anybody is having any idea please help me out... 

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

How to display in HH:MM:SS... ? abhilash.androiddeveloper@gmail.com - 2013-10-10 10:58 -0700
  Re: How to display in HH:MM:SS... ? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2013-10-13 09:57 +0200
  Re: How to display in HH:MM:SS... ? Arne Vajhøj <arne@vajhoej.dk> - 2013-10-19 22:23 -0400

csiph-web