ich schaffe es nicht aus dem Datumsformat YYYY-MM-DD H:i das deutsche TT.MM.JJJJ umzuwandeln.
Mit
Code: Alles auswählen
$query= "SELECT created,lastmodified FROM " . $cfg["tab"]["upl_meta"] . " WHERE idupl = " . $dllist_item->get("idupl");
$str_file_modified = $dllist_item->get("lastmodified");
$str_file_created = $dllist_item->get("created");
$tpl->set("d", "FILE_CREATED", $str_file_created );
$tpl->set("d", "FILE_MODIFIED", $str_file_modified );
Aber wie bekomme ich das Datum jetzt "schick"?
Habe schon folgendes versucht .. ohne Erfolg:
Code: Alles auswählen
$str_file_created = date("d.m.Y", $str_file_created)
oder versucht mit:
Code: Alles auswählen
if (!function_exists('date_mysql2german')) {
function date_mysql2german($str_file_created) {
$d = explode("-", $str_file_created);
return sprintf("%02d.%02d.%04d", $d[2], $d[1], $d[0]);
}
}
MfG Steffen