Wednesday, January 14, 2009

ToString()

I am always forgetting how to use ToString() to get things formatted the way I want them.

To format a datetime as a date:

RequestedShipDate.ToString("d");

RequestedShipDate.ToString("MM/dd/yyyy");

No comments: