From: Joey Schulze Date: Mon, 1 Mar 2010 15:23:34 +0000 (+0100) Subject: Format date values with German date format X-Git-Tag: 2010-06-02_customer~155 X-Git-Url: https://git.infodrom.org/?p=misc%2Fkostenrechnung;a=commitdiff_plain;h=4e5e7c40a8fe097c9ce6e7b8d4122b557636113a Format date values with German date format --- diff --git a/ajax/ajax.php b/ajax/ajax.php index 5095ca6..5f2e3c9 100644 --- a/ajax/ajax.php +++ b/ajax/ajax.php @@ -6,7 +6,9 @@ function fetch($mask) { $fields = array("to_char(sys_edit,'DD.MM.YYYY HH24:mm') AS sys_edit", 'sys_user'); foreach ($mask['edit'] as $field => $info) - if ($info['type'] != 'passwd') + if ($info['type'] == 'date') + $fields[] = sprintf("to_char(%s,'DD.MM.YYYY') AS %s", $field, $field); + elseif ($info['type'] != 'passwd') $fields[] = $field; $sql = sprintf('SELECT id,%s FROM %s WHERE id = %d',