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... ?

X-Received by 10.224.93.19 with SMTP id t19mr22720997qam.3.1381427928044; Thu, 10 Oct 2013 10:58:48 -0700 (PDT)
X-Received by 10.50.73.132 with SMTP id l4mr360621igv.0.1381427927965; Thu, 10 Oct 2013 10:58:47 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!a6no8838462qak.0!news-out.google.com!9ni27135qaf.0!nntp.google.com!i2no4776511qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Thu, 10 Oct 2013 10:58:47 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=114.79.185.116; posting-account=yjKnlAoAAACy0a-hF_8KIVO1BNYDvI5D
NNTP-Posting-Host 114.79.185.116
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <c40d8b94-ebd9-43e4-be96-4bfbb8bb69eb@googlegroups.com> (permalink)
Subject How to display in HH:MM:SS... ?
From abhilash.androiddeveloper@gmail.com
Injection-Date Thu, 10 Oct 2013 17:58:47 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.programmer:26295

Show key headers only | 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