Here you can find the source of formatDateToString(Date timestamp)
Parameter | Description |
---|---|
timestamp | zu konvertierndes Date-Objekt |
public static String formatDateToString(Date timestamp)
//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); } }