Languages
[Edit]
EN

Java - subtract hours from Date (java.util.Date)

7 points
Created by:
Joann-Calderon
383

Hi, today I would like to show you how to subtract hours from Date in Java.

Quick solution:

In above example we subtracted 2 hours from current time.

Full example with imports:

 

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Java - Date & Time

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join