I am using a System.DateTime object to allow a user to select a date range. The user is only able to select a date (not time) using a third party calendar so I
System.DateTime
this will give you the expected result:
DateTime startDate= DateTime.Now.Date; DateTime endDate= startDate.AddDays(2).Add(new TimeSpan(23, 59, 59)); //startDate: 28/9/2017 0:0:0 endDate: 29/9/2017 23:59:59