Java Date Format formatDate(java.util.Date paramDate)

Here you can find the source of formatDate(java.util.Date paramDate)

Description

format Date

License

Open Source License

Declaration

public static String formatDate(java.util.Date paramDate) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

public class Main {
    public static String formatDate(java.util.Date paramDate) {
        if (paramDate == null)
            return null;
        SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        localSimpleDateFormat.setLenient(false);
        return localSimpleDateFormat.format(paramDate);
    }//w w w . jav a  2 s.  c  o  m
}

Related

  1. formatDate(final java.util.Date date, final Supplier formatSupplier)
  2. formatDate(int day, int month, int year)
  3. formatDate(Integer day, Integer month, Integer year)
  4. formatDate(java.util.Calendar in)
  5. formatDate(java.util.Date date)
  6. formatDate(Object obj)
  7. formatDate6(Date date)