Thursday, 14 January 2016

Generate Timestamp

Write below code in class :


static SimpleDateFormat sdf = new SimpleDateFormat("ddMM_hhmmss");
static java.util.Date curDate = new java.util.Date();
static String strDate = sdf.format(curDate);
static String strActDate = strDate.toString();

No comments:

Post a Comment