Monday, May 7, 2012

JAVA Date and time formatting

public static String getDateNow(){
  DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
return (dateFormat.format(date))+"";
}

No comments:

Post a Comment