You are here: Re: Calculate Days Worked « PHP Programming Language « IT news, forums, messages
Re: Calculate Days Worked

Posted by keychain on 06/15/07 05:33

"howzit" <jimpearce@gmail.com> wrote in message
news:1181843030.832620.252810@z28g2000prd.googlegroups.com...
>I have a set date in my MySQL database that records when a Sales Lead
> is established and I echo that date as $row_rsLead['lead_date'];
>
> I need to be able to calculate how many days that lead has existed.
> $row_rsLead['lead_date']; outputs as 2007-06-14.
>
> I have made numerous attempts to create a function that will calculate
> the days between the lead_date and today's date, but have made
> absolutely no headway. I am either stuck working between differing
> date formats or really strange numerical outputs.
>
> If there is a script someone is willing to share or point me in a
> direction that is good for a relative newcomer to PHP, I would be most
> grateful.
>
> Thanks folks.
>

Another method is to use INT for date values, which makes it a breeze to
calculate the difference between 2 dates.

 

Navigation:

[Reply to this 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

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