Android Date Format formatDate(Date date)

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

Description

format Date

Parameter

Parameter Description
date a parameter

Declaration

public static String formatDate(Date date) 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final SimpleDateFormat sdf = new SimpleDateFormat(
            "yyyy-MM-dd'T'HH:mm:ss.SSS");

    /**//from www  .jav a2 s. co  m
     * 
     * @param date
     * @return
     */
    public static String formatDate(Date date) {
        return sdf.format(date);
    }
}

Related

  1. dateFormat(String sdate, String format)
  2. formatcurrentDate(int format)
  3. formatDataTime(Date date)
  4. formatDate(Date date)
  5. formatDate(Date date)
  6. formatDate(Date date, String pattern)
  7. formatDate(Date date, String pattern, Locale locale)
  8. format(Date d, String dateFormat)
  9. getShortFriendlyDate(Date dt)