I am hoping someone has figured out the issue I am having. I have an ajax call to my MySQL database. I am using ColdFusion and jQuery datatables to display my fields. Everything works fine except when I try to format the date. I have tried to use <cfset>
to format the date prior to the JavaScript and I have tried a number of other solutions found online. Below is my code.
$(document).ready(function() {
var table = $('#TableData').dataTable({
"bProcessing": true,
"bStateSave": true,
"bServerSide": true,
"sAjaxSource": "MyCFMCall.cfm",
"aoColumns": [{
"sName": "ID",
"sClass": "hidden"
},
{
"sName": "DATABASE_DATE",
"sTitle": "APP DATE",
"bSortable": "true"
} //<!---My timestamp from the database--->
],
"columnDefs": [
{
"render": function(data, type, row) {
return "+row[1]+";
}, //<!---This will render the timestamp only, yet not formated.--->
"targets": 1
}
],
});
});
If anyone can show me how to format this rendered timestamp into a more readable format I would really appreciate it.