#24925: Coalesce converts datetime to string on MySQL
-------------------------------------+-------------------------------------
Reporter: Ian-Foote | Owner: Ian-Foote
Type: Bug | Status: assigned
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by shaib):
The first comment is not clear to me: It may refer to
{{{
cast (coalesce (field, now) as datetime)
}}}
or to
{{{
coalesce (field, cast (now as datetime))
}}}
The latter may be done completely automatically by Django, the former may
also be done automatically if an output field is provided.
Also note https://dev.mysql.com/doc/refman/5.6/en/date-and-time-
literals.html -- before 5.6.4 !MySql understood date literals as strings,
not sure how that applies to embedded variables; please try to re-test
this with a later-than-5.6.4 version.
--
Ticket URL: <https://code.djangoproject.com/ticket/24925#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.ec41302b2b9a2099c83e96a997bde289%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.