SyntaxFix
Write A Post
Hire A Developer
Questions
Something like:
Date oldDate = new Date(); // oldDate == current time final long hoursInMillis = 60L * 60L * 1000L; Date newDate = new Date(oldDate().getTime() + (2L * hoursInMillis)); // Adds 2 hours