aspose file tools*
The moose likes Beginning Java and the fly likes how to get the response time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to get the response time" Watch "how to get the response time" New topic
Author

how to get the response time

ritesh vishwakarma
Greenhorn

Joined: Apr 09, 2008
Posts: 1
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

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Howdy ritesh vishwakarma,

Welcome to JavaRanch

Hope you got it resolved by using Paul's suggestion.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
 
 
subject: how to get the response time