Java Date to String dateToStringTemporalCoverage(Date date)

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

Description

date To String Temporal Coverage

License

Apache License

Declaration

public static String dateToStringTemporalCoverage(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String dateToStringTemporalCoverage(Date date) {

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        try {// ww  w .j av a 2  s  .com
            return sdf.format(date);
        } catch (NullPointerException ex) {
            return "";
        }
    }
}

Related

  1. dateToString_yyyyMMddHHmmssSSS(Date date)
  2. DateToStringByformat2(Date date)
  3. dateToStringFecha(Date fecha)
  4. dateToStringFormat(Date dt, String format)
  5. dateToStringShort(Date date)
  6. dateToStringVerbose(Date date)
  7. dateToStringWithFormat(Date dateToString, String dateFormat)
  8. dateToStringWithPattern(Date date, String pattern)
  9. dateToStringWithPattern(Date date, String pattern)