Java yyyy formatG(Date date)

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

Description

format G

License

LGPL

Declaration

public static String formatG(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String FORMAT_STYLE_G = "yyyy-MM-dd";

    public static String formatG(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat(FORMAT_STYLE_G);
        if (null != date && !"".equals(date)) {
            return sdf.format(date);
        }//  w w  w .j a  va  2  s  .  c  o m
        return null;
    }
}

Related

  1. formatDateToString(String strDate)
  2. formatDicomDate(String dicomDate)
  3. formatearDateToString(Date date)
  4. formatFecha(Date fecha)
  5. formatFromDate(Date date)
  6. formatHL7TSFormat4Date(Date time)
  7. formatJJJJMMTT(long time)
  8. formatPGNDate(final Date pDate)
  9. formatRTGSDate(java.util.Date date)