Java Date to String convert(Date date, String style)

Here you can find the source of convert(Date date, String style)

Description

convert

License

Apache License

Declaration

public static String convert(Date date, String style) 

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 convert(Date date, String style) {
        if (date == null || style == null)
            return null;
        return new SimpleDateFormat(style).format(date);
    }/*  w  w w.ja  v  a  2 s  .co  m*/
}

Related

  1. convert(Date date)
  2. convertDate(Date d)
  3. convertDate(Date date)
  4. convertDate(Date date)
  5. convertDate(Date date)