Java Date Time to String dateTimeToString(Calendar dateTime)

Here you can find the source of dateTimeToString(Calendar dateTime)

Description

date Time To String

License

Apache License

Declaration

public static String dateTimeToString(Calendar dateTime) 

Method Source Code


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

import java.text.DateFormat;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static final DateFormat FORMAT_DATE_TIME = new SimpleDateFormat("dd/MM/yyyy HH:mm");

    public static String dateTimeToString(Calendar dateTime) {
        if (dateTime == null)
            return null;
        return FORMAT_DATE_TIME.format(dateTime.getTime());
    }/*from w  w  w  .  j  a v a2 s .  c  om*/
}

Related

  1. dateTimeToString(Date d)
  2. dateTimeToString(Date d)
  3. dateTimeToString(Date date)
  4. DateTimeToString(Date date)