I have a calendar and a textbox that contains a time of day. I want to create a datetime that is the combination of the two. I know I can do it by looking at the hours and m
If you are using two DateTime objects, one to store the date the other the time, you could do the following:
var date = new DateTime(2016,6,28); var time = new DateTime(1,1,1,13,13,13); var combinedDateTime = date.AddTicks(time.TimeOfDay.Ticks);
An example of this can be found here