In an aspx page I am binding the labels like this:
&l
Create a FormatDate
method in your codebehind, and call that from your gridview.
http://msdn.microsoft.com/en-us/library/8kb3ffffd4.aspx
http://www.csharp-examples.net/string-format-datetime/
This part will go in your code behind
private object FormatDate(DateTime input)
{
return String.Format("{0:MM/dd/yy}", input);
}
And this bit will go in your markup
This is what I would call a D.R.Y. approach to the problem. If you ever need to modify the formatting in any way. You can simply edit the code behind method and it will rain down sweet love to all of your markup.