Here you can find the source of formatCurrentDateTimeStamp(final String dateFormatString)
Parameter | Description |
---|---|
dateFormatString | pattern for the date format. |
public static String formatCurrentDateTimeStamp(final String dateFormatString)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/* ww w . j a v a 2 s .c o m*/ * Supplies Current Date in the given dateFormat. * * @param dateFormatString * pattern for the date format. * * @return date * string representation of the date. */ public static String formatCurrentDateTimeStamp(final String dateFormatString) { String tmpString = ""; SimpleDateFormat format = new SimpleDateFormat(dateFormatString); tmpString = format.format(new Date()); return tmpString; } }