Java Date Format As formatDateToMinutes(Date date)

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

Description

Method formatDateToMinutes.

License

Open Source License

Parameter

Parameter Description
date a parameter

Return

String

Declaration

public static String formatDateToMinutes(Date date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**/*from  w  ww  . jav  a2s .c  o  m*/
     * Method formatDateToMinutes.
     * 
     * @param date
     * @return String
     */
    public static String formatDateToMinutes(Date date) {
        if (date != null)
            return new SimpleDateFormat("MM/dd/yyyy hh:mm a").format(date);
        else
            return null;
    }
}

Related

  1. formatDateSwedish(Date date)
  2. formatDateTd(Object obj)
  3. formatDateToday()
  4. formatDateToDefault(Date date)
  5. formatDateToMD(Date date)
  6. formatDateToUTC(Date date)
  7. formatDateToUTC(final Date date)
  8. formatDateUsingW3C(Date date)
  9. formatDateUTC(Date d)