Mailinglisten-Archive |
Hallo Cornelia, hallo Andreas,
Cornelia Boenigk schrieb:
> Hi Andreas
>
> Versuchs mal mit sowas:
> $ts ist der Inhalt der Tabellenspalte im Format yyyy-mm-dd
>
> function datum($ts) {
> return substr($ts, 8, 2).'.'.substr($ts, 5,2).'.'.substr($ts, 0, 4);
> }
Oder mit explode:
function datum($ts) {
$teile=explode ('-', $ts);
return ($teile[2].'-'.$teile[1].'-'.$teile[0]);
}
Ich liebe explode... *g*
Greetings und guts Nächtle
Mike.
--
Training und Projekte
http://www.gidel.de
php::bar PHP Wiki - Listenarchive