Thanks Chris,

You're right, I reversed the arguments. However, SELECT TIME_FORMAT('%f',CURTIME());
  gives normal time format like 17:37:47
SELECT TIME_FORMAT('%f',NOW());
  gives normal date/time format.
SELECT MICROSECOND(CURTIME());
  gives 0.

I need microseconds to get the query runtime.
But a format like 0.05 sec is also right for me. Maybe any other ideas ?



----- Original Message ----- From: "Chris White" <[EMAIL PROTECTED]>
To: "C.R.Vegelin" <[EMAIL PROTECTED]>
Cc: <mysql@lists.mysql.com>
Sent: Friday, January 05, 2007 3:58 PM
Subject: Re: how to get (lapse) time in microseconds ?




C.R.Vegelin wrote:
Hi List,

I need the lapse time in microseconds.
I have tried various things, like:
SELECT TIME_FORMAT(CURTIME(), '%f');
SELECT TIME_FORMAT(NOW(), '%f');

Your arguments are reversed.  It's:

SELECT TIME_FORMAT('%f',CURTIME());
SELECT TIME_FORMAT('%f',NOW());

SELECT MICROSECOND(CURTIME());
Don't know about this one though.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to