Java Date to String dateToString(Date date)

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

Description

Convert Date to String with MM/dd/yyyy format.

License

Open Source License

Parameter

Parameter Description
date a parameter

Declaration

public static String dateToString(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {
    /**//  w w  w.  j a  va  2 s.c  om
     * Convert Date to String with MM/dd/yyyy format.
     * @param date
     * @return
     */
    public static String dateToString(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
        return sdf.format(date);
    }
}

Related

  1. dateToString(Date date)
  2. dateToString(Date date)
  3. dateToString(Date date)
  4. dateToString(Date date)
  5. dateToString(Date date)
  6. dateToString(Date date)
  7. dateToString(Date date)
  8. dateToString(Date date)
  9. dateToString(Date date)