Java Date to String convertDate(Date d)

Here you can find the source of convertDate(Date d)

Description

convert Date

License

Open Source License

Declaration

public static String convertDate(Date d) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    private static DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");

    public static String convertDate(Date d) {
        return df.format(d);
    }//from   ww  w.jav a  2  s.  co  m
}

Related

  1. convert(Date date)
  2. convert(Date date, String style)
  3. convertDate(Date date)
  4. convertDate(Date date)
  5. convertDate(Date date)
  6. convertDate(Date passedDate)