Java Hour Format formatAsDateAndTime(Date date)

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

Description

format As Date And Time

License

Open Source License

Declaration

public static String formatAsDateAndTime(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    private static final SimpleDateFormat sdfDateAndTime = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");

    public static String formatAsDateAndTime(Date date) {
        if (date != null) {
            return sdfDateAndTime.format(date);
        }//w  ww .  j  a  v a  2 s  .co m
        return null;
    }
}

Related

  1. format_default(Date time)
  2. formatAbsoluteTime(long time)
  3. formatAddTime(Date addTime)
  4. formatAllDate(Date date)
  5. formatAsCassandraDateTime(Date date)
  6. formatAsHour(long l)
  7. formatAsRoundTripDate(Date date)
  8. formatAsXsdDateTime(Date date)
  9. formatCalendarForXpath(Calendar date)