battle programmers alliance
Would you like to react to this message? Create an account in a few clicks or log in to continue.

battle programming a forum for elite programmers with extreme will power to sharpen their skills
HomeGallerySearchRegisterLog in

 java get future time

Go down 
Moti Barski
Moti Barski

Posts : 573
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

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
java get future time
Back to top 
Page 1 of 1

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