Re: timestamp displaying fractions of seconds
Posted by: Bill Karwin
Date: August 10, 2006 11:41PM

I don't think so.

http://dev.mysql.com/doc/refman/5.0/en/time.html says:

"You can specify TIME values in a variety of formats:
As a string in 'D HH:MM:SS.fraction' format. ... Note that MySQL does not store the fraction part."

In other words, the TIME datatype parses but discards the fractional seconds. The DATETIME and TIMESTAMP datatypes don't even parse the fraction.

So you can't use the TIME, DATETIME, or TIMESTAMP datatypes to store fractional seconds. But you could use some other datatype, like FLOAT or VARCHAR. You just can't use that as a date/time value for purposes of doing date arithmetic, etc. You'd have to handle any calculations in your application code.

Options: ReplyQuote


Subject
Written By
Posted
Re: timestamp displaying fractions of seconds
August 10, 2006 11:41PM


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.