Java Time Format getStrDateTime()

Here you can find the source of getStrDateTime()

Description

get Str Date Time

License

Open Source License

Declaration

public static String getStrDateTime() 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getStrDateTime() {
        return getStrDateTime(new Date());
    }//  ww  w. j  a  v a  2  s .c om

    public static String getStrDateTime(Date date) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
        return dateFormat.format(date);
    }
}

Related

  1. getGenerationTime(String format)
  2. getIntegerDateTime(Date date, String dateFormat)
  3. getShowTime(Date date, String format)
  4. getStartTimeFormatter()
  5. getStrDateByFormat(Date time, String format)
  6. getStringFormatFromDateTime(long pDateTime, String format)
  7. getStringFromTime(Date time, String format)
  8. getSysDateTimeForFileName()
  9. getSysTimeYMDHMS2()