Java Parse Date Pattern YYYY parseStringToDatePrettyPrint(Date date)

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

Description

Converts a Date object into a String object for pretty printing.

License

Apache License

Parameter

Parameter Description
date a <code>Date</code> object to be converted

Exception

Parameter Description
ParseException an exception

Return

a String object converted

Declaration

public static String parseStringToDatePrettyPrint(Date date) 

Method Source Code

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

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

public class Main {
    static final private SimpleDateFormat pretty_format = new SimpleDateFormat("mm/dd/yyyy 'at' HH:mm a z");

    /**/*from  ww w  .  ja va  2  s. com*/
     * Converts a <code>Date</code> object into a <code>String</code> object for pretty printing.
     *
     * @param date a <code>Date</code> object to be converted
     * @return a <code>String</code> object converted
     * @throws ParseException
     */
    public static String parseStringToDatePrettyPrint(Date date) {
        return pretty_format.format(date);
    }
}

Related

  1. parseStringForDate(String dateString)
  2. parseStringToCalendar(String strDate)
  3. parseStringToDate(final String pDate, final String... pFormat)
  4. parseStringToDate(String date)
  5. parseStringToDate(String dateString)
  6. parseStringToUtilDate(String strDate)
  7. parseTIPPDate(String dateString)
  8. parseToDate(final String date, final String format)
  9. parseToDate(String date)