Instead why don't you try select date_sub(now(), INTERVAL 1 DAY)
Karthik. ----- Original Message ----- From: "DL Neil" <[EMAIL PROTECTED]> To: "Erick Papadakis" <[EMAIL PROTECTED]>; "mysql" <[EMAIL PROTECTED]> Sent: Wednesday, September 04, 2002 3:09 PM Subject: Re: problem with date/time column > Hi Erick, > > > i have a date/time column. i insert into it using "now()". works fine. > > now i want a query where data/time is either today or yesterday. > > how should i do it? > > > Calculate the date required (yesterday and/or today) and then add a time > component of midnight (all zeroes) to make up a date-time value. Then it is > a matter of performing a WHERE calculated_time < column_value. > > If you are planning on performing date arithmetic you may want to consider > moving from date-time format to UNIX format timestamps. > > Regards, > =dn > > > > --------------------------------------------------------------------- > 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 > > --------------------------------------------------------------------- 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