I have following JavaScrip code which works for ColdFusion 10, but not ColdFsuion 9.
Because I have ColdFusion production server so I need find a solution for ColdFusion 9.
I use SQL Server 2008 as backend.
If SQL server returns datetime type then I can get curr_date, curr_month and curr_year.
The datetime type return is 'April, 25 2014 00:00:00', but I want to dispaly without time section and if it is possible that I need display like mm-dd-yyyy or yyyy-mm-dd have more compact display.
If SQL server returns date type then rowdata, curr_date, curr_month, and curr_year are NaN.
SQL returns '2014-04-25' when I use Date Type which is what I need, but ColdFusion does not recognize when I pass to the other form and it reads NaN.
I understand that it is JavaScrip code, but for some reason they have different behavior on ColdFusion 9 and ColdFusion 10.
I would like to know is it possible to get compact date format and ColdFusion can recognize as a date field to parse right information,
Your help and information is great appreciated,
Regards,
Iccsi,
var d = new Date(rowdata[1]);
var curr_date = d.getDate();
var curr_month = d.getMonth() +1 ;
var curr_year = d.getFullYear();