Skip to main content
Skip table of contents

convertDate

Typ


Versionshinweise

11.2

Web Client(Haken)

Code

GROOVY
String DateUtils.convertDate(Date date, int dateStyle)

Beschreibung

Formatiert ein Datum anhand des übergebenen Formats.

Parameter

  • date - Der Datumswert für die Konvertierung
  • dateStyle - Die Formatierung für das Datum.
    Mögliche Werte:
    • DateUtils.FORMAT_SHORT besteht komplett aus Zahlen und die Jahreszahl hat nur 2 Stellen, wie zum Beispiel 12.13.52
    • DateUtils.FORMAT_MEDIUM ist länger, wie zum Beispiel 07.03.2011
    • DateUtils.FORMAT_LONG ist noch länger, wie zum Beispiel 7. März 2011
    • DateUtils.FORMAT_FULL ist fast komplett angegeben, wie zum Beispiel Montag, 7. März 2011

Rückgabe

Gibt das Datum formatiert zurück.

Beispiele

GROOVY
String dateTime = DateUtils.convertDate(new Date(0), DateUtils.FORMAT_SHORT);
//=>"12.13.52"
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.