List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 14 1999 1:12am
Subject:Re: How to use the correct Date and Time Functions
View as plain text  
On Thu, 1999-09-09 19:00:36 +0200, Christian Mack wrote:
> > mysql> select VAID,Start,Ende from Termine where
> >    --> '1999-05' BETWEEN Start AND Ende order by VAID;
[...]
> The rows missing don't lay in your between specification.
> Mysql will make '1999-05-01' out of your '1999-05' date.
> So VAID=48 ('1999-05-03' till '1999-06-28') is an explicitely
> forbidden row.

The explanation is not quite correct.  As far as I know MySQL
doesn't transform '1999-05', but just compares the strings.
 '1999-05' < '1999-05a'   is true, and
 '1999-05' < '1999-05-01' is true, too.

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
How to use the correct Date and Time FunctionsJuergen Buddy Hoffmann1 Sep
  • Re: How to use the correct Date and Time FunctionsMartin Ramsch1 Sep
    • Re: How to use the correct Date and Time FunctionsJuergen Buddy Hoffmann1 Sep
    • Re: How to use the correct Date and Time FunctionsJuergen Buddy Hoffmann1 Sep
      • Re: How to use the correct Date and Time FunctionsMartin Ramsch14 Sep
  • Re: How to use the correct Date and Time FunctionsChristian Mack9 Sep
    • Re: How to use the correct Date and Time FunctionsMartin Ramsch14 Sep