Here you can find the source of formatDate(Date _date)
Parameter | Description |
---|---|
_date | a parameter |
public static String formatDate(Date _date)
//package com.java2s; //License from project: LGPL import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//from ww w.jav a2 s. c o m * @param _date * @return */ public static String formatDate(Date _date) { if (_date == null) { return "1970-01-01"; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(_date); } }