Here you can find the source of getStringOfNowDate(String fFormatStr)
Parameter | Description |
---|
public static String getStringOfNowDate(String fFormatStr)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getStringOfNowDate(String fFormatStr) { String nowDateString = dateTypeToString(new Date(), fFormatStr); return nowDateString; }//from www .j a v a 2s. co m public static String dateTypeToString(Date date, String fFormatStr) { //yyyy-MM-dd HH:mm:ss SimpleDateFormat dateformat = new SimpleDateFormat(fFormatStr); String strDate = dateformat.format(date); return strDate; } }