Validate the datetime value: Difference between revisions
Jump to navigation
Jump to search
→Verify the value is not 1900-01-20 xx:xx:xx
| Line 4: | Line 4: | ||
== MySQL approach == | == MySQL approach == | ||
=== Verify the value is not 0000-00-00 00:00:00 === | |||
Schema of column value | |||
* Type: datetime | |||
* Default value: 0000-00-00 00:00:00 (NOT allow be NULL) | |||
<pre> | |||
SELECT `my_date_column` | |||
FROM `my_table` | |||
WHERE `my_date_column` LIKE '1900-%'; | |||
</pre> | |||
=== Verify the value is not 1900-01-20 xx:xx:xx === | === Verify the value is not 1900-01-20 xx:xx:xx === | ||