Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. String strcurdate ;
  2. Date currentDate;
  3.  
  4. Calendar cal = Calendar.getInstance();
  5. SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
  6. strcurdate = " " + sdf.format(cal.getTime()).toString();
  7. // System.out.println("Today's date" + strcurdate);
  8. DateFormat format = new SimpleDateFormat("dd/MM/yyyy");
  9. try {
  10. currentDate = format.parse(strcurdate);
  11. System.out.println("DAte in Match time" + currentDate);
  12.  
  13. } catch (ParseException e) {
  14. // TODO Auto-generated catch block
  15. e.printStackTrace();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement