Hi Manisha I have used the same thing in a pretty different way.
Basically....i have stored the date in string format say 'YYYYMMDD' and then done simple comparison say 20031125<20031029 by converting it into Long format in my local code (note::this will specially work in case of YYYYMMDD format as future date will always be greater than past date in Long Format) Though this may not solve your problem completely but i hope this gives you some pointers. regards Kams -----Original Message----- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 6:50 PM To: [EMAIL PROTECTED] Subject: Compare dates I have a table with start_date (date), end_date (date), rate(float) as 3 fields, I want to compare today's date with start and end date if it is inside this range then pick up the corresponding rate. But how mysql stores dates ? (YYYY-MM-DD ?) how can i compare with today's date ? I tried some different combinations but in not successful. regards, manisha -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]