Reply to Re: How to get the days between two given dates (no sql stuff)

Your name:

Reply:


Posted by Alvaro G Vicario on 08/24/05 15:09

*** JAPIO wrote/escribió (23 Aug 2005 03:08:45 -0700):
> I have two variables which look like:
> $begin = "23-08-05"
> $end = "26-08-05"
>
> Now i want also to know the dates between them.
> 24-08-05
> 25-08-05

Days or dates?

For days (not tested):

<?

$begin = "23-08-05";
$end = "26-08-05";

echo ceil( (strtotime($end)-strtotime($begin)) / 86400 );

?>

I not sure though whether strtotime() works with European format.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация