The error message is:
Unable to convert MySQL date/time value to system. datetime
Cause:
It is mainly used to insert a date to a MySQL table. If the date to be inserted is not accepted by MySQL, or at 23:59:59, the date field is0/0/0000 0:00:00 AMEspecially when data is dumped from MSSQL or other databases to MySQL.
Solution:
1. On the ColdFusion management interface.
2. Select the data source to be modified ). Then edit.
3. On the data source editing page, there is an input box:Connection string.
4. In the input box, enter:Allow zero datetime = true;
5. Save.
If it is Asp.net, add it directly to the connection stringAllow zero datetime = true;Just do
For ColdFusion, this method only enables cfquery to retrieve data without errors. However, in the result returned by cfquery, all datetime fields return an object. Cannot be called directly.
<Cfquery name = "qry_a" datasource = "myds">
Select * from test
</Cfquery>
Let's assume that qry_a has a time field called T1.
NoAllow zero datetime = trueIf the year is to be displayed
<Cfoutput> # year (qry_a.t1) # </cfoutput>
If there is such a sentence, the processing will become:
<Cfoutput> # qry_a.t1.get_year () # </cfoutput>, which is completely called by Java.
This solution is feasible after testing.