I did this and the msg is: Invalid Date . I think it's because everything turned string. How do I bring only the numeric part in the date? Incidentally, I say this, because I can not return a date in our format within jQuery . In 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 was the cast I made, but the date comes type:
Mon Jun 16 2014 14:24:45 GMT....
I would like only one: 06/16/2014, without the time part