Android Date Format formatDateToString(Date timestamp)

Here you can find the source of formatDateToString(Date timestamp)

Description

Konvertiert ein Date-Objekt in eine lesbare Zeitangabe (als String)

License

Open Source License

Parameter

Parameter Description
timestamp zu konvertierndes Date-Objekt

Return

Zeitangabe (String)

Declaration

public static String formatDateToString(Date timestamp) 

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 String CLIENT_DATE_FORMAT = "dd.MM.yyyy HH:mm";

    /**/*w w  w .  j a va  2s.co  m*/
     * Konvertiert ein Date-Objekt in eine lesbare Zeitangabe (als String)
     *
     * @param timestamp zu konvertierndes Date-Objekt
     * @return Zeitangabe (String)
     */
    public static String formatDateToString(Date timestamp) {
        return new SimpleDateFormat(CLIENT_DATE_FORMAT).format(timestamp);
    }
}

Related

  1. format(Date d, String dateFormat)
  2. getShortFriendlyDate(Date dt)
  3. getFormatDateString(String format)
  4. getFormatDateString(String format, java.util.Date date)
  5. getFormatDateTime(String formatString, Date d)
  6. getStringByFormat(Date date, String format)
  7. getStringByFormat(Date date, String format)
  8. convertDateToString(Date date)
  9. formatDate(Date date)