0
I did that and MSG is: Invalid Date. I think it’s because everything has turned into a string. How do I bring only the numerical part on the date? In fact, I say this because I cannot return a date in our format within the jQuery. In the Alert() gives Invalid Date.
var dtCadastro = data.agendamento.DataCadastro.substring(6, data.agendamento.DataCadastro.length - 2);
var dtAgendanmento = data.agendamento.DataAgendamento.substring(6, data.agendamento.DataAgendamento.length - 2);
var dtVisita = data.agendamento.DataVisita.substring(6, data.agendamento.DataVisita.length - 2);
var dt = new Date(dtCadastro);
alert(dt);
var dtCadastro = (Date)(data.agendamento.DataCadastro.substring(6, data.agendamento.DataCadastro.length - 2));
This is the cast I did, but the date’s like:
Mon Jun 16 2014 14:24:45 GMT....
I would like just one: 16/06/2014, without the hour part
I did a pada cast Date, then I can bring the date, but it comes in a format almost extensive and I would like it to be like this: dd/MM/yyyy only. I will edit the post to show the cast
– pnet
It’s easier for you to format the date in C#. You have the C# code snippet that returns the value so I can help?
– Joao Paulo