Link to home
Start Free TrialLog in
Avatar of tia_kamakshi
tia_kamakshiFlag for United Arab Emirates

asked on

Adding 15 min to current time in java

Hi,

I am working in java

I want to add 15 minutes to current time

How do we do that

Please guide

Many Thanks
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Date fifteenLater = new Date(System.currentTimeMilllis() + (100*60*60*15));
Oops - typo
Date fifteenLater = new Date(System.currentTimeMilllis() + (1000*60*60*15));

Open in new window

... and get rid of the extra 'l' in Millis ;-)
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tia_kamakshi

ASKER

Many Thanks
:-)