Software Development and stuff
Discussions relating to Software Development. Other rants thrown in for free
Wednesday, March 05, 2008
ASP.NET Tips #1 - Formatting Bound Columns to short date
I am back doing web development with my current contract, so thought I would post some quick tips as I came across things that may not be obvious.
This is fairly easy, but a good way to start. Say you have a date column that is displaying the time, but you only want to show the short date.
On the column set the DataFormatString to "{0:d}" and set HtmlEncode="false". Job Done.
Example:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment