Re: MySql and displaying only yesterday's records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux