Bernard Clement wrote:
Your select works fine within the month to the exception of the first day
because curdate()-1 is treated as a numeric field (see curdate in
http://www.mysql.com/doc/en/Date_and_time_functions.html)
The following seems to be what you want to do:
mysql> select date_format(c
Your select works fine within the month to the exception of the first day
because curdate()-1 is treated as a numeric field (see curdate in
http://www.mysql.com/doc/en/Date_and_time_functions.html)
The following seems to be what you want to do:
mysql> select date_format(curdate()- interval 1 da
Campanella Danilo wrote:
Hi,
Look at what happened today :
mysql> select curdate();
++
| curdate() |
++
| 2004-03-01 |
++
1 row in set (0.00 sec)
mysql> select (curdate()-1);
+---+
| (curdate()-1) |
+---+
| 20040300 |
+---
Hi,
Look at what happened today :
mysql> select curdate();
++
| curdate() |
++
| 2004-03-01 |
++
1 row in set (0.00 sec)
mysql> select (curdate()-1);
+---+
| (curdate()-1) |
+---+
| 20040300 |
+---+
1 row in set (0.00