Bug #10466 | Datatype "timestamp" displays "YYYYMMDDHHMMSS" irrespective of display sizes. | ||
---|---|---|---|
Submitted: | 9 May 2005 9:58 | Modified: | 13 Jul 2005 19:29 |
Reporter: | Disha | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.4 Beta-standard | OS: | Any (any) |
Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[9 May 2005 9:58]
Disha
[9 May 2005 11:57]
Hartmut Holzgraefe
According to the documentation TIMESTAMP doesn't take a precision or display width spec at all and SHOW CREATE TABLE doesn't show one either so the value seems to be ignored silently. There should at least be a warning instead.
[15 Jun 2005 12:16]
Magnus Blåudd
To get the date formatted as "20050302" use the DATE_FORMAT function. Ex: mysql> SELECT DATE_FORMAT('2005-03-02 22:23:00', '%Y%m%d'); +----------------------------------------------+ | DATE_FORMAT('2005-03-02 22:23:00', '%Y%m%d') | +----------------------------------------------+ | 20050302 | +----------------------------------------------+ 1 row in set (0.01 sec)
[16 Jun 2005 15:13]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/26066
[20 Jun 2005 10:09]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/26179
[20 Jun 2005 10:12]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/26180
[27 Jun 2005 13:27]
Magnus Blåudd
Added printout of warnings if TIMESTAMP is used with length, ex TIMESTAMP(6) produces warning "Warning 1287 'TIMESTAMP(6)' is deprecated; use 'TIMESTAMP' instead " Pushed to 5.0.9
[13 Jul 2005 19:29]
Paul DuBois
Noted in 5.0.9 changelog.