Hi, All:
    I have a database which contains date attribute in string format
(like 2004-08-12). I want to genearte a report based on period time.
I use the syntax:
date1 ='2004-08-12'
date2='2004-08-18'
SELECT * FROM account WHERE (TO_DAYS(date) >= TODAYS(date1)) and
(TO_DAYS(date) <= TO_DAYS(date2));
The report script complains the condition after WHERE clause. The
reason I use TO_DAYS is that I want to convert 
string date data into integer for comparison. Can I use TO_DAYS() like
this way ?
     Thanks a lot.

    Yong


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to