I have probably just stared at this too long...
I have a third-party datepicker (ASP/MVC) and I stringify the array of selected dates and pass it to the controller.
example:
I know that this is meant to be midnight since it is from a timeless datepicker.
In c#, how do I convert this back to its original time? I am in PST but that should not matter.
Try
string date = "2013-05-21T04:00:00Z" ;
DateTime dt = Datetime.parse(date);
dt = dt.Date;
You will get the date component only, with the time component as midnight. I hope this satisfies your requirement.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.