user2765654
user2765654

Reputation:

How can I add an int (minutes) to LocalDateTime.now()?

I want to modify LocalDateTime.now() by adding a certain amount of minutes to it. How do I do that?

Upvotes: 49

Views: 70250

Answers (1)

Raghuveer
Raghuveer

Reputation: 3057

If you are using java 8 then you can still use the same syntax

LocalDateTime fiveMinutesLater = LocalDateTime.now().plusMinutes(5)

Upvotes: 106

Related Questions