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.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
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.