How do I format this date 2016-10-23T20: 30: 01.017 in a Datatable.net in the Brazilian dd / mm / yyyy format?
Controller:
This relevant snippet of code is where I populate the object that is in the format ok: dd / mm / yyyy hh: mm: ss:
List<Cliente> lTotalClienteAux = _IRepositorio.ListarCliente().ToList();
List<Cliente> lTotalCliente = new List<Cliente>();
foreach (var item in lTotalClienteAux)
{
Cliente oCliente = new Cliente();
oCliente.ClienteID = item.ClienteID;
oCliente.DataCadastro = item.DataCadastro;
lTotalCliente.Add(oCliente);
}
View When you click here in the View the format changes to: 2016-10-24T20: 35: 13.617
{
"mRender": function (data, type, full) {
var dt = full['DataCadastro'];
return '<td>' + dt + '</td>';
}
},
web.config In web.config I have this tag indicating the culture:
<system.web>
<globalization uiCulture="pt-BR" culture="pt-BR" enableClientBasedCulture="true" />