my dog learned polymorphism
The moose likes Servlets and the fly likes Date & time operation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Date & time operation" Watch "Date & time operation" New topic

Date & time operation

Mark Leong
Ranch Hand

Joined: Dec 11, 2000
Posts: 60
I have a date and time formatted as follows:-
Date = "2002-02-28"
Time = "14:15:00"
Date is formatted as yyyy-mm-dd and time is hh:mm:ss
How to add/minus X hours from the above date/time?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Check out the Calendar and GregorianCalendar classes.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Date & time operation
It's not a secret anymore!