When the date is retrieved from the Json data, it is displayed as follows:
2017-09-14T22:11:05.5303556
Is there a way to present it in a more user-friendly format, such as:
09/14/2017 22:11:05
Here is a snippet of the Json data:
[
{
id: 98,
dateCreated: "2017-09-14T22:11:05.5303556"
},
{
id: 99,
dateCreated: "2017-09-14T22:11:05.5615556"
}
]
Furthermore, here is the corresponding JavaScript code:
<script>
$.ajax({
url:'http://mywebsite/api/Response',
dataType: 'json',
success: function(json) {
myTable = $('#myTable').columns({
data:json,
schema: [
{"header":"ID", "key":"id"},
{"header":"Date", "key":"dateCreated"}
],
});
}
});
</script>
Do you have any suggestions on how to modify the code so that the date is shown in a more user-friendly format? Your assistance is greatly appreciated.