Possible problem with DateDiff due to moving from Access to MySQL
This is "inherited" code, so I am having to reverse engineer this application.
I converted the data from MS Access to MySQL 5.1 using Navicat. That part of the process seemed to go well. But, when I run the Time Reporting page on the website I get a ColdFusion error that says: "Incorrect parameter count in the call to native function 'DateDiff'.
The error routine points to the code in this query as the problem.
<cfquery name="getTotalHours" datasource="#application.DSN#">
SELECT WorkDate, Hours
FROM tbltimereport
WHERE UserID=#session.AuthUserID# AND DateDiff("m", WorkDate, #CreateODBCDateTime(URL.StartDate)#) = 0
<cfif ProjectID NEQ "">
AND ProjectID=#URL.ProjectID#
</cfif>
</cfquery>
I've looked at this and various manuals for a whole day and can't figure out the problem. I'm hoping someone knows of some difference between the way the code is handled in Access versus MySQL that may explain the problem. I think it might also be an incorrect datatype between the two. Access had the WorkDate has a "date/time" datatype. Navicat set it to "Date" in MySQL.
Thank you.
Subject
Views
Written By
Posted
Possible problem with DateDiff due to moving from Access to MySQL
4952
May 12, 2010 04:06PM
Sorry, you can't reply to this topic. It has been closed.
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.