|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
PHP-General - Work out how many days
Say i have the date "2008-05-06" and i want to find how many days ago that was in php, what is the easiest way?
|
|
#2
|
||||
|
||||
|
That looks like something from MySQL...
Is it? Because then you can use the DATEDIFF function: Code:
SELECT DATEDIFF(NOW(), date) AS `days` If not, try PHP Code:
__________________
Oyashiro-sama...
If something "isn't working" then EXPLAIN WHY. Tell us what it should do, and then what it does do.PHP Manual (cURL - PCRE regex - references) error_reporting() SQL injection: and mysql_real_escape_string() PHP and cron Negative0 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > PHP-General - Work out how many days |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|