This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get the response time
 
Similar Threads
webservice Https connection
Display date and time in users Timezone?
back ground process id ??
SSL error
Date comparision in SQL from timestamp