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