Bug #28623 | Problem on date function | ||
---|---|---|---|
Submitted: | 23 May 2007 15:48 | Modified: | 24 May 2007 13:21 |
Reporter: | Michael Douglas | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S2 (Serious) |
Version: | 5.0.41-community-nt | OS: | Windows (XP) |
Assigned to: | CPU Architecture: | Any | |
Tags: | NOW(), returns not as expected |
[23 May 2007 15:48]
Michael Douglas
[24 May 2007 13:21]
Valeriy Kravchuk
Sorry, but this behaviour is explicitely documented (http://dev.mysql.com/doc/refman/5.0/en/datetime.html): As of MySQL 5.0.8, conversion of DATETIME values to numeric form (for example, by adding +0) results in a double value with a microseconds part of .000000: mysql> SELECT NOW(), NOW()+0; +---------------------+-----------------------+ | NOW() | NOW()+0 | +---------------------+-----------------------+ | 2007-04-23 14:21:52 | 20070423142152.000000 | +---------------------+-----------------------+ Before MySQL 5.0.8, the conversion results in an integer value with no microseconds part.