Re: MySql and displaying only yesterday's records

From: Date: Mon, 21 Oct 2002 14:33:18 +0000
Subject: Re: MySql and displaying only yesterday's records
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-22552@lists.php.net to get a copy of this message
On Monday 21 October 2002 22:07, lallous wrote: > TO_DAYS() applied on datetime field is returning different values on > different times but same date! > > How can I pass to TO_DAYS() only the DATE part of my datetime field? As far as I can tell, TO_DAYS() does only use the DATE part regardless whether you have passed a DATETIME field. Try: select TO_DAYS(datetime_field) from table; and/or: select FROM_DAYS(TO_DAYS(datetime_field)) from table; Anyway this is definitely belongs to the MySQL list, not here. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Christoph, please remember that irony is not available between the Canadian and Mexican border.... you are confusing them again 8) - Alan Cox on linux-kernel */

« previous php.db (#22552) next »