Re: The very first day of march :-) (select (curdate()-1);)

2004-03-01 Thread Michael Stassen
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

Re: The very first day of march :-) (select (curdate()-1);)

2004-03-01 Thread Bernard Clement
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

Re: The very first day of march :-) (select (curdate()-1);)

2004-03-01 Thread Daniel Kasak
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 | +---

The very first day of march :-) (select (curdate()-1);)

2004-03-01 Thread Campanella Danilo
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