Stripping a DateTime Object of its time value

  • Thread starter Thread starter tariq
  • Start date Start date
T

tariq

Hi,

Any knows how i can strip a Date time object of the time value in it.

My current approach is
tempdate = DateTime.Parse(tempDate.ToShortDateString());

Looks quite nasty. Anyone knows of a better way?



- T
 
tariq said:
Any knows how i can strip a Date time object of the time value in it.

My current approach is
tempdate = DateTime.Parse(tempDate.ToShortDateString());

Looks quite nasty. Anyone knows of a better way?

I thikn you're after the DateTime.Date property.
 
Back
Top