I have a datetime (mssql) in my database which looks basically like this:
2018-03-27 17:50:38.703
When I try to display it in my jQuery datatable it looks like this:
/Date(1522165838703)/
The jQuery datatable requires this date format which is valid for sorting:
dd-MM-yy
I have tried to convert it like this:
new Date(data).toString('dd-MM-yy')
But I'm getting value as:
Invalid Date
What am I doing wrong here? How can I convert it to a proper jQuery datatable format dd-MM-yy ?
Can someone help me out?