Add 2 hours to current timestamp in Java
Posted on 2012-04-02
Little weak in this area...
Im running a scheduler job using Java 1.5 and I pulling the record from the database, then getting the create timestamp of the record from the oracle database and then I want to add 2 hours to it and see if greater than the current time. Basically Im delaying processing of a record until two hours have gone by.
Could some provide me a simple example of adding 2 hours to the timestamp and then checking against the current timestamp to see if it needs processed.