Java String to Date toDateString(Date date)

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

Description

to Date String

License

Apache License

Parameter

Parameter Description
date a parameter

Declaration

public static String toDateString(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**/*from  w ww .  java2s. co m*/
     * @param date
     * @return
     */
    public static String toDateString(Date date) {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm").format(date);
    }
}

Related

  1. toDateOracle(Date d, String format, String hqlFormat)
  2. toDates(DateFormat format, String[] values)
  3. toDateString(Calendar cal)
  4. toDateString(Date date)
  5. toDateString(Date date)
  6. toDateString(Date date, String format)
  7. toDateString(Date date, String format)
  8. toDateString(Date date, String format)
  9. toDateString(Date date, String formatPattern)