Datetime format ?
Hi All,
ColdFusion 2018 is passing a datetime in the format '2019-05-16 23:59:00.0'
The code I am using is given below
<cftry>
<cfset fromDateObject=parsedateTime(datefrom)>
<cfset toDateObject=parsedateTime(dateto)>
<cfset fromDateTimeString=dateFormat(fromDateObject, "yyyy/mm/dd") & " " & timeFormat(fromDateObject, "HH:nn:ss")>
<cfset toDateTimeString=dateFormat(toDateObject, "yyyy/mm/dd") & " " & timeFormat(toDateObject, "HH:nn:ss")>
<cfstoredproc procedure="dbo.multi_report_pkg.run_multi_report" datasource="#datasource#" username="#Session.UserName#" password="#Session.password#">
<cfprocparam value="#Session.multi_rep_id#">
<cfprocparam value="#Session.UserName#">
<cfprocparam value="#multi_report_def_id#">
<cfprocparam cfsqltype="CF_SQL_TIMESTAMP" value="#parsedateTime(fromDateTimeString)#">
<cfprocparam cfsqltype="CF_SQL_TIMESTAMP" value="#parsedateTime(toDateTimeString)#">
<cfprocparam value="#period#">
</cfstoredproc>
<cfcatch type="any">
<cfdump var="#cfcatch#" label="cfcatch" >
<cfdump var="#variables#" label="variables">
<cfdump var="#session#" label="session">
</cfcatch>
</cftry>
in the backend in Oracle , If I use to_date its not working and I get an error message
"ORA-01830: date format picture ends before converting entire input string
01830. 00000 - "date format picture ends before converting entire input string"
*Cause:
*Action:
Would like to know what should I use in this case, to make ColdFusion 2018 pass the date in the format yyyy-mm-dd hh24:mi:ss ?
Thanks
IQ
