Thread GROUP BY Timestamp ?: Tag bei Timestamp herausfinden (30 answers)
Opened by Froschpopo at 2004-08-05 08:00

foobar
 2004-08-05 16:54
#32509 #32509
User since
2003-08-04
69 Artikel
BenutzerIn
[default_avatar]
Quote
DATEDIFF(expr,expr2)
DATEDIFF() returns the number of days between the start date expr and the end date expr2. expr and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation.

mysql> SELECT DATEDIFF('1997-12-31 23:59:59','1997-12-30');
-> 1
mysql> SELECT DATEDIFF('1997-11-30 23:59:59','1997-12-31');
-> -31

DATEDIFF() was added in MySQL 4.1.1.

Welche Version von Mysql benutzt du denn? älter als 4.1.1 ? Ich arbeite mit 4.1.3 und da funktioniert es.
The three chief virtues of a programmer are: Laziness, Impatience and Hubris
[Larry Wall]

View full thread GROUP BY Timestamp ?: Tag bei Timestamp herausfinden