Java Date to String datetoStr2(Date date)

Here you can find the source of datetoStr2(Date date)

Description

dateto Str

License

Apache License

Declaration

public static String datetoStr2(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Date;

public class Main {
    public static final String FmtDateTime = "yyyy-MM-dd HH:mm:ss";

    public static String datetoStr2(Date date) {
        java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(FmtDateTime);
        String curDate = sdf.format(date);
        return curDate;
    }/*from w  w w.j a va 2 s. c  o  m*/
}

Related

  1. dateToStr(Date date, String format)
  2. dateToStr(Date date, String format)
  3. dateToStr(Date date, String formatstr)
  4. dateToStr(Date date, String formatType)
  5. dateToStr(Date source)
  6. datetoStr3(Date date)
  7. dateToStrIBInput(Date date)
  8. dateToString(Date d)
  9. dateToString(Date d)