The line of code DateTime d = DateTime.Today; results in 10/12/2011 12:00:00 AM. How can I get only the date part.I need to ignore the time part when I compare two dates.
The line of code DateTime d = DateTime.Today; results in 10/12/2011 12:00:00 AM .
Share
DateTimeis a DataType which is used to store bothDateandTime. But it provides Properties to get theDatePart.You can get the Date part from
DateProperty.http://msdn.microsoft.com/en-us/library/system.datetime.date.aspx