Re: Urgent DATA help needed

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

 



Chris Payne wrote:

Could anyone show me an example of how to do this? So to take 2001-07-05
and add 3 days to it?

To use SQL to do this:

> SELECT FROM_DAYS((TO_DAYS('2001-07-05') + 3));

The TO_DAYS and FROM_DAYS are nice functions to use when you are fildling with dates as numbers (i.e. doing arithmatic operations to the dates). There are also a bunch of other function dedicated to do math operations to date and they are listed here:

http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html

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