eI am trying to show database time in the datatable but issue is show the current time
see database time
see datatable time
.cshtml
- $.ajax({
- url: strUrl,
- type: 'POST',
- success: function (result) {
-
- console.log("inside the success method")
- $('#').DataTable({
- data: result,
- columns: [
- { data: "StartFromTime" },
- { data: "EndToTime" },
-
- ],
-
- "aoColumnDefs": [
- {
- "aTargets": [0],
-
- "mRender": function (row) {
-
-
-
-
-
-
-
-
-
-
-
- return moment(row.StartFromTime).format('hh:mm:ss');
-
- }
- },
- {
- "aTargets": [1],
-
- "mRender": function (row) {
- return moment(row.EndToTime).format('hh:mm:ss');
-
- }
- },
model
- public class TimeList
- {
- public int Id { get; set; }
- public DateTime StartFromTime { get; set; }
- public DateTime EndToTime { get; set; }
how to show the database time in datatable?
problem is moment() is built in jquery function that is the reason show the current time I want to show database time
I want to show database time in datatable?