Java String to Date toDateString(Date date, String format)

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

Description

to Date String

License

Apache License

Declaration

public static String toDateString(Date date, String format) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String toDateString(Date date, String format) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);
        return dateFormat.format(date);
    }/*  w w w.  jav  a 2s .c o  m*/
}

Related

  1. toDates(DateFormat format, String[] values)
  2. toDateString(Calendar cal)
  3. toDateString(Date date)
  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 formatPattern)
  9. toDateString(Date date, TimeZone timezone)