TURN CONCAT( yy, ' years ', mm, ' months ', dd, ' days ', hh, '
>> hours ', mi, ' mins ', ss, ' secs' );
>>
>> END
>>
>> Maybe this will help.
>>
>> Thanks,
>>
>> Randall Price
>> Seni
ayer.
>
> If you must do this in mysql, then you'll probably want to write a stored
> function.
>
> -Original Message-
> From: Tompkins Neil [mailto:neil.tompk...@googlemail.com]
> Sent: Friday, March 05, 2010 10:27 AM
> To: prabhat kumar
> Cc: [MySQL]
>
to:neil.tompk...@googlemail.com]
Sent: Friday, March 05, 2010 10:27 AM
To: prabhat kumar
Cc: [MySQL]
Subject: Re: Displaying date/time
Hi
That is kind of what I'm looking for. However I'd like to be able to
display the difference between date 1 and date 2 like
1d 2h 29min ago
Thanks
N
bhat kumar
Cc: [MySQL]
Subject: Re: Displaying date/time
Hi
That is kind of what I'm looking for. However I'd like to be able to
display the difference between date 1 and date 2 like
1d 2h 29min ago
Thanks
Neil
On Fri, Mar 5, 2010 at 3:32 PM, prabhat kumar wrote:
> Might be this
Hi
That is kind of what I'm looking for. However I'd like to be able to
display the difference between date 1 and date 2 like
1d 2h 29min ago
Thanks
Neil
On Fri, Mar 5, 2010 at 3:32 PM, prabhat kumar wrote:
> Might be this will help you:
> there is a table called message with 3 colums - id,
Might be this will help you:
there is a table called message with 3 colums - id, pubdate and message;
You can get all messages from the last 5 minutes with the following example;
SELECT TIMESTAMPDIFF(MINUTE, pubdate, now()), id, message from message where
(TIMESTAMPDIFF(MINUTE, pubdate, now()) < 5