Bug #24349 date/time function behavior with zero '0000-00-00' date
| Submitted: | 16 Nov 2006 0:50 | ||
|---|---|---|---|
| Reporter: | Timothy Smith | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
| Version: | 5.0 | OS: | Any |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[16 Nov 2006 0:50]
Timothy Smith
[16 Nov 2006 0:54]
Timothy Smith
test of date/time functions with 0000-00-00 00:00:00
Attachment: zero-date.sql (text/x-sql), 13.10 KiB.
[17 Nov 2006 6:00]
Timothy Smith
When in doubt, return NULL. So:
Return NULL for everything except the following DATE_FORMAT formats:
DATE_FORMAT('0000-00-00 00:00:00', '%c')
DATE_FORMAT('0000-00-00 00:00:00', '%D')
DATE_FORMAT('0000-00-00 00:00:00', '%d')
DATE_FORMAT('0000-00-00 00:00:00', '%e')
DATE_FORMAT('0000-00-00 00:00:00', '%m')
DATE_FORMAT('0000-00-00 00:00:00', '%Y')
DATE_FORMAT('0000-00-00 00:00:00', '%y')
And, ensure that a Warning is emitted for all cases.
Regards,
Timothy
[28 Apr 2010 3:51]
blabla ballalsj
Any progress on this ? Why isn't the connector returning DateTime.Min like it's doing in the explicit operator implementation for DateTime ?
[28 Apr 2010 4:01]
blabla ballalsj
On a closer look this doesn't really apply to me. Sorry.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.042 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.