On Monday 31 January 2011 21:12, Phillip Baker wrote: > Greetings All, > > I am looking for a little help in setting a where clause. > I have a dateAdded field that is a DATETIME field. > I am looking to pull records from Midnight to midnight the previous day. > I thought just passing the date (without time) would get it but I keep > getting an empty record set. > So looking for something that works a bit better.
select * from your_table where convert(dateAdded, date)='2011-01-31'; -- Jørn Dahl-Stamnes homepage: http://www.dahl-stamnes.net/dahls/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org