Java Date to String date2String(Date date)

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

Description

date String

License

LGPL

Declaration

public static String date2String(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String date2String(Date date) {
        String time = null;//  www  .  j av  a2 s  .c o  m
        try {
            SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmm");
            time = format.format(date);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return time;
    }
}

Related

  1. date2String(Date date)
  2. date2String(Date date)
  3. date2String(Date date)
  4. date2String(Date date)
  5. date2string(Date date)
  6. date2String(Date date, DateFormat dateFormat)
  7. date2String(Date date, int _iType)
  8. Date2String(Date date, String DateFormat)
  9. date2string(Date date, String format)