Reputation: 5554
Besides the DateTime ctor (new DateTime(year, month, day)) , is there any other way to truncate a date?
Upvotes: 4
Views: 6840
Reputation: 175653
DateTime.Now.ToShortDateString();
Also, ToString() is overloaded in DateTime, you can pass a few dozen formatting options to it.
See: http://authors.aspalliance.com/aspxtreme/sys/demos/datetimeformats.aspx
Upvotes: 3