public String getToday() {
SimpleDateFormat sdfbeginDate = new SimpleDateFormat("MM/dd/yyyy");
return sdfbeginDate.format(Calendar.getInstance().getTime());
}
public String getNowAsTimestampString() {
Calendar nowCalendar = Calendar.getInstance();
java.util.Date myDate = nowCalendar.getTime(); // ex: Thu Aug 09 13:20:36 EDT 2014
SimpleDateFormat sdf = new SimpleDateFormat( "MM/dd/yyyy/HH/mm/ss");
return sdf.format( myDate );
}
public String getNowAsDateString() {
Calendar nowCalendar = Calendar.getInstance();
java.util.Date myDate = nowCalendar.getTime(); // ex: Thu Aug 09 13:20:36 EDT 2014
SimpleDateFormat sdf = new SimpleDateFormat( "MM/dd/yyyy");
return sdf.format( myDate );
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment