Java Date to String convertDate(Date date)

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

Description

convert Date

License

Open Source License

Declaration

protected static String convertDate(Date date) 

Method Source Code


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

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

public class Main {
    protected static String convertDate(Date date) {

        if (date != null)
            return new SimpleDateFormat("yyyy-MM-dd'T'h:m:ssZ").format(date);
        else/* ww  w  .  j  ava  2  s  . co  m*/
            return null;
    }
}

Related

  1. convert(Date date)
  2. convert(Date date, String style)
  3. convertDate(Date d)
  4. convertDate(Date date)
  5. convertDate(Date date)
  6. convertDate(Date passedDate)
  7. convertDate(final Date date)
  8. convertDate2Str(java.util.Date date, String format, String defaultValue)
  9. convertDate2String(Date date)