0

How to add hours, minutes, seconds into DateTime in Joda Time?

Share:

In this example you’ll learn how to add some hours, minutes or seconds into the DateTime object in Joda Time. Some couple methods available to plus or minus some hours, minutes or seconds from the object, as you can see in the example below.

The DateTime object is an immutable object, which means calling one of the plus or minus method does not modified the current object. Instead, these method return a new DateTime object for each method calls.

The program print the following result:

Filed in: Joda-Time

Leave a Reply

Submit Comment

© 2014 Java Examples - Developed with