File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes how to substract time and date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to substract time and date" Watch "how to substract time and date" New topic

how to substract time and date

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
How can I substract time and date so as to get output in int.
The example is metioned below. I need output in "int" in format mentioned below.
for example
int time=(20:30:00-02:45:00)

int date=(2001-12-7)-(2000-4-6)
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
I am moving this thread to the Java Beginner Forum.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link:
subject: how to substract time and date
jQuery in Action, 3rd edition