mohamedazmi
Posts: 13
|
| Posted: 04/04/2011, 5:44 PM |
|
Can some one help me, total number of day from two different date
|
 |
 |
saseow
Posts: 744
|
| Posted: 04/04/2011, 9:24 PM |
|
I presume that you want the number of days between two dates. Try something like this where $start is the first date and $end is the last date:
$start_ts = strtotime($start);
$end_ts = strtotime($end);
$diff = $end_ts - $start_ts;
return round($diff / 86400);
|
 |
 |
Waspman
Posts: 948
|
| Posted: 04/05/2011, 12:16 AM |
|
where are your original dates to compare coming from?
_________________
http://www.waspmedia.co.uk |
 |
 |
mohamedazmi
Posts: 13
|
| Posted: 04/05/2011, 12:19 AM |
|
i have 2 column (date)
|
 |
 |
Waspman
Posts: 948
|
| Posted: 04/05/2011, 5:16 AM |
|
so they are coming from the page?
jjrjrr1 (?) sorted this when he explained how CCS converts dates to an array before presentation.
go here;
http://forums.yessoftware.com/posts.php?post_id=97052
_________________
http://www.waspmedia.co.uk |
 |
 |