I have a DateTime instance that has a Date and a Time. How do I extract only the date or only the time?
DateTime
var day = value.Date; // a DateTime that will just be whole days var time = value.TimeOfDay; // a TimeSpan that is the duration into the day
2.1m questions
2.1m answers
60 comments
57.0k users