Hallo,
habe folgendes Statement
SELECT
IF(anfang < CURRENT_DATE(),CURRENT_DATE,anfang) as beginn,
FROM
veranstaltung
WHERE
...
ich habe alles als DATE abgespeichert. Gerne würde ich "beginn" natürlich folgendermaßen formatieren:
SELECT
...as DATE_FORMAT(beginn,'%d.%m.%Y'),
FROM
Aber da bekomme ich immer eine Fehlermeldung:
"MYSQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_FORMAT(anfang,'%d.%m.%Y'),"
Kann mir jemand helfen, wie ich IF Block und eine schicke Ausgabe des Datums gleichzeitig hinbekomme?
Gruß,
Malte