List of usage examples for java.text SimpleDateFormat SimpleDateFormat
public SimpleDateFormat(String pattern)
SimpleDateFormat
using the given pattern and the default date format symbols for the default java.util.Locale.Category#FORMAT FORMAT locale. From source file:Main.java
public static String GetSysTime() { SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String date = sDateFormat.format(new java.util.Date()); return date;// ww w.j a va 2s .co m }
From source file:Main.java
public static String getCurrentTime() { return new SimpleDateFormat("yyyyMMddHH").format(new Date()); }
From source file:Main.java
public static String getCurrentTime() { return new SimpleDateFormat("yyyyMMddHHmmssSS").format(new Date()); }
From source file:Main.java
public static String getDate(long date) { SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yy"); return dateFormat.format(date); }
From source file:Main.java
public static String getDateHMS(long time) { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); String dt = sdf.format(time); return dt;//from ww w . j a va2s .com }
From source file:Main.java
public static String getDateDay(long time) { SimpleDateFormat sdf = new SimpleDateFormat("dd"); String dt = sdf.format(time); return dt;/*w w w. j a v a 2 s .c o m*/ }
From source file:Main.java
public static String getCurrentDate() { SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return sDateFormat.format(new java.util.Date()); }
From source file:Main.java
public static String getCurrentDate() { return new SimpleDateFormat("yyyy-MM-dd").format(new Date()); }
From source file:Main.java
public static String getTimeStamp() { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()); }
From source file:Main.java
public static String getDateWeek(long time) { SimpleDateFormat sdf = new SimpleDateFormat("E"); String dt = sdf.format(time); return dt;/*from ww w .ja va 2 s . co m*/ }