> > CREADE INDEX myDateField_Index
> > ON tblTabel
> > (
> > DATE_FORMAT(myDateField,'%Y%m%d')
> > );
> >
> > This may or may not work, but it's worth a shot, if you prefer your
query
> in
> > the format it was in before.
>
> It did not work with MySQL 3.23.32, it whould have been very nice,
because i
> still have a problem with hours, eg.:
>
> SELECT count(id)
> FROM tblTable
> WHERE myField != '' AND
> (
> myDateField >= '00000000230000' AND
> myDateField < '00000000235959'
> );
>
> Wich offcourse does not work, so again i am looking for some help?

I am not sure I quite understand your problem, but doen't the BETWEEN ...
AND operator
solve your problem? All you have to do is to format the limits in a way
that MySQL understands
to be a timestamp, and it should then do a proper date comparison.

     Alec Cawley



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to