|
Posted by Rami Elomaa on 06/15/07 07:41
"howzit" <jimpearce@gmail.com> wrote in message
news:1181847829.369664.295800@i13g2000prf.googlegroups.com...
On Jun 14, 11:48 am, Rami Elomaa <rami.elo...@gmail.com> wrote:
> > howzit kirjoitti:
> >
> >
> >
> > > 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.
> >
> > http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#f...
> >
> > SELECT DATEDIFF(lead_date, NOW()) AS days
> >
> > Or something like that. Next time RTFM before asking.
> >
>
> The reason I posted here (as stated above) was the solutions I have
> read and researched were not working for me. I was not asking to be
> spoon fed - I asked for guidance and direction.
Well you got both guidance and direction: a perfectly good solution and a
link to the correct manual page. I don't understand why you're upset.
> No need to insinuate I haven't RTFM. If it is too much to help, keep
> your bitter thoughts to yourself - everyone has to start somewhere you
> dick!
What we have here is a failure to communicate. Nothing in your original post
indicated that you had in fact read the manual. You stated that you've made
numerous attempts to _create a function_, as in, not looking in the manual
or finding other solutions. That is why I suggested that you should next
time Read The Fine Manual before asking.
--
Rami.Elomaa@gmail.com
"Good tea. Nice house." -- Worf
[Back to original message]
|