Re: Displaying date/time

2010-03-09 Thread Tompkins Neil
TURN CONCAT( yy, ' years ', mm, ' months ', dd, ' days ', hh, ' >> hours ', mi, ' mins ', ss, ' secs' ); >> >> END >> >> Maybe this will help. >> >> Thanks, >> >> Randall Price >> Seni

Re: Displaying date/time

2010-03-08 Thread Tompkins Neil
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] >

RE: Displaying date/time

2010-03-08 Thread Price, Randall
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

RE: Displaying date/time

2010-03-05 Thread Gavin Towey
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

Re: Displaying date/time

2010-03-05 Thread Tompkins Neil
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,

Re: Displaying date/time

2010-03-05 Thread prabhat kumar
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