Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
- Calendar cal = Calendar.getInstance();
- String currenttime = new String(dateFormat.format(cal.getTime()));
- String futuretime = new String (dateFormat.format(__________); //how to store future date if i have the current date
- System.out.println(dateFormat.format(cal.getTime()));
- Calendar cal2 = Calendar.getInstance();
- cal2.add(Calendar.DAY_OF_MONTH, 3);//A date in future (achieved somehow)
- String currenttime = new String(dateFormat.format(cal.getTime()));
- String futuretime = new String (dateFormat.format(cal2.getTime()));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement