Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   [PHP] Datum als String in anderes Format (https://www.delphipraxis.net/34409-%5Bphp%5D-datum-als-string-anderes-format.html)

CalganX 22. Nov 2004 20:50


[PHP] Datum als String in anderes Format
 
Hi,
ich habe ein Datum in einem sehr komischen Format.
Code:
Tue, 16 Nov 2004 22:56:18 +0100
Gibt es eine Möglichkeit das elegant und einfach z.B. in
Code:
16.11.2004, 22:56
umzuwandeln?

Chris

Pr0g 22. Nov 2004 21:13

Re: [PHP] Datum als String in anderes Format
 
Code:
<?php
  // in Timestamp umwandeln
  $timestamp = strtotime('Tue, 16 Nov 2004 22:56:18 +0100');

  // als formatiertes Datum ausgeben
  echo date('d.m.Y, H:i', $timestamp);
?>
MfG Pr0g

CalganX 22. Nov 2004 21:17

Re: [PHP] Datum als String in anderes Format
 
Hi,
danke. :) Genau das habe ich gesucht.

Chris


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:05 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz