On Fri, August 11, 2006 12:23 am, William Stokes wrote: > One more question. I have dates as a datetime in DB. Like 2006-08-11 > 08:20:00 and I'm playing only with date part in the calendar > 2006-08-11. So > how to compare this date to the datetime info in DB? Do I need to use > DATE_FORMAT or someting like this in the query? One easy way would be to type-cast it to date in your query: where convert(whatdate, 'date') = '2006-08-11' However, not all SQL engines do data type conversion the same way... If you never ever need the time part, then you could just change the schema to use only 'date' and not 'timestamp' -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php