Java Date Format Check checkDate(Date date)

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

Description

Dates handler.

License

Open Source License

Parameter

Parameter Description
date a parameter

Declaration

public static String checkDate(Date date) 

Method Source Code

//package com.java2s;
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

import java.text.DateFormat;
import java.util.Date;

public class Main {
    /**/* w w  w.  j a  v  a 2 s  . co m*/
     * Dates handler.
     * 
     * @param date
     * @return
     */
    public static String checkDate(Date date) {
        if (date == null) {
            return ""; //$NON-NLS-1$
        }
        DateFormat formatter = DateFormat.getDateTimeInstance();
        return formatter.format(date);
    }
}

Related

  1. checkDate(String begingDate, String endDate)
  2. checkDate(String deadline)
  3. checkDateBetween(String time)
  4. checkDateByMask(String sDateValue, String sDateFormat)