Thomas Meinike: datum in zahl umwandeln

Beitrag lesen

Hallo,

ich wollte folgendes datum im zahl umwandeln

01.07.2004 14:09:56

dafür habe ich strtotime() benutz aber leider funkz nicht. kennt jemmand andere befehl, oder hat jemand ein scrip die ich benutzen kann

strtotime() moechte u. a. dieses Format: 2004-07-01 14:09:56.

Probiere es so:

<?php

$datumzeit="01.07.2004 14:09:56";
$temp1=explode(" ",$datumzeit);
$temp2=explode(".",$temp1[0]);
$datumzeit=$temp2[2]."-".$temp2[1]."-".$temp2[0]." ".$temp1[1];
print strtotime($datumzeit); // 1088683796

?>

MfG, Thomas