battle programming a forum for elite programmers with extreme will power to sharpen theire skills
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Share
 

 java get future time

Go down 
AuthorMessage
Moti Barski

Moti Barski

Posts : 311
Join date : 2011-08-02

java get future time Empty
PostSubject: java get future time   java get future time EmptyFri May 03, 2019 5:25 pm

Code:
Calendar cal = Calendar.getInstance();
      System.out.println("current date: " + cal.getTime());
      cal.add(Calendar.MINUTE, 7);
      SimpleDateFormat df = new SimpleDateFormat("HH:mm");
      System.out.println("7 minutes later: " + df.format(cal.getTime()));

cal.add(Calendar.MINUTE, 7);
.what to add to (can be days seconds...)
,7 : how many to add it is on

_________________
MB over and out emp it up
Back to top Go down
View user profile
 
java get future time
Back to top 
Page 1 of 1
 Similar topics
-
» Change Date and Time in Windows 7
» Cannot locate the class Select in web driver
» Retrieving number of rows in a table
» Constant body chills!

Permissions in this forum:You cannot reply to topics in this forum
battle programmers alliance :: battle programming alliance :: battle programming-
Jump to: