Re: How to calculate time difference
janakiraman t Wrote:
> select TIMEDIFF ('2006-10-31 11:50:31' , '2006-10-31 11:50:01')
> but it is saying you have an error in sql syntax.
> Iam using mysql 4.1.0 version.
TIMEDIFF() is available from MySQL 4.1.1 onwards.
Try
select UNIX_TIMESTAMP('2006-10-31 11:50:31') - UNIX_TIMESTAMP('2006-10-31 11:50:01')
And you shouldn't put a space between a function name and the opening parenthesis.
--
felix
Please use
BBCode to format your messages in this forum.
Subject
Written By
Posted
November 01, 2006 01:42AM
Re: How to calculate time difference
November 02, 2006 09:45AM
November 19, 2008 01:00AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.