You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can avoid this issue completely if I simply present the current date on the client form. In this way the user will have to edit the current date to their birthdate. This ensures that an official date is entered in the column. Or I can do something like this in the view:
eg.
(($client->getClient_birthdate())->format($datehelper->style())) === '-0001-11-30' ? 'Please fill in your birthdate'
:
(($client->getClient_birthdate())->format($datehelper->style()))
rossaddison
changed the title
🐛 Dummy mysql date ie. '0000-00-00' in date column, running sqlmode="" (ie. not strict mode), is presented as -0001-11-30
🐛 Minor issue: Dummy mysql date ie. '0000-00-00' in date column, running sqlmode="" (ie. not strict mode), is presented as -0001-11-30
Oct 2, 2022
5.1.11 Server SQL Modes https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html
With strict mode disabled, invalid dates such as '2004-04-31' are converted to '0000-00-00' and a warning is generated. NO_ZERO_DATE The NO_ZERO_DATE mode affects whether the server permits '0000-00-00' as a valid date. If this mode is not enabled, ... The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients, depending on the value of the sql_mode system ... B.3.4.2 Problems Using DATE Columns https://dev.mysql.com/doc/refman/8.0/en/using-date.html
The special “zero” date '0000-00-00' can be stored and retrieved as '0000-00-00'. When a '0000-00-00' date is used through Connector/ODBC, it is automatically converted to NULL because ODBC cannot handle that kind of date. MySQL permits you to ...You should use this format in UPDATE expressions and in the WHERE clause of SELECT ...
rossaddison
changed the title
🐛 Minor issue: Dummy mysql date ie. '0000-00-00' in date column, running sqlmode="" (ie. not strict mode), is presented as -0001-11-30
🐛 Minor issue: Zero/Dummy mysql date ie. '0000-00-00' in date column, running sqlmode="" (ie. not strict mode), is presented as -0001-11-30
Oct 2, 2022
No duplicates 🥲.
What happened?
The date on the view is in the format:
eg. ($client->getClient_birthdate())->format(....users...date...format....choice...eg. 'Y-m-d');
ie. DateTimeImmutable date with the format command.
Version
The date was presented as -0001-11-30 as a string
The text was updated successfully, but these errors were encountered: