5
With the code below I am recovering the Datetime with time past the date, what I would not like.
cursos.Data = DateTime.Parse(collection["Data"]);
I tried to format using substring inside Datetime.Parse, but was unsuccessful.
My domain
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
public DateTime Data { get; set; }
In the client’s CMS in editing mode, this being displayed 30/08/2014 00:00:00, although in the bank is with the correct date, ie without the time
What do you mean, "with time past the date", try to be clearer in your question, and give more details of your problem.
– Fernando Leal
Try using this: courses. Data = Datetime.Parse(Collection["Data"]). Toshortdatestring();
– Diego Zanardo
I didn’t understand the reason for the negative votes. @Diegozanardo tried but I didn’t succeed.
– Rafael Barbosa