Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get the response time

 
ritesh vishwakarma
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i am facing a problem that is, these two date farmet are comming from datadase(MS-Acsess) 11899-12-30 17:32:00 and 899-12-30 17:06:00 in string form.
i don't understand how to get the response time please anybody help me...

in mathmetics
a=11899-12-30 17:32:00
b=899-12-30 17:06:00
a-b=00:26:00 min (this is i want)
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First and foremost you need to parse this string and create a Date object. Have a look at java.text.SimpleDateFormat for a way to do this. Once you have your Dates you can find out how much time is between them in milliseconds. After that, its pretty straight forward to render this information.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy ritesh vishwakarma,

Welcome to JavaRanch

Hope you got it resolved by using Paul's suggestion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic