dlastlee

Saturday, January 23, 2016

ASP.NET GridView datastringformat - custom date format

To create custom data format (or any standard string format used by Microsoft):

DataFormatString="{0:MM/dd/yyyy}"


For standard formats:
https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.boundfield.dataformatstring(v=vs.110).aspx


Sample:
http://dlastlee.com/Apps/SWRM/Releases.aspx
Posted by Douglas Lee at 11:39 AM
Labels: programming

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Links

  • dlastlee

Pages

  • Home

Blog Archive

  • ►  2020 (2)
    • ►  February (2)
  • ▼  2016 (12)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (5)
    • ▼  January (4)
      • ASP.NET GridView datastringformat - custom date fo...
      • C# GridView - Hide Cell/Link When Value is NULL
      • HR - Replacement to Resumes?
      • HR - Years of Experience
  • ►  2013 (12)
    • ►  July (2)
    • ►  June (3)
    • ►  May (1)
    • ►  April (1)
    • ►  March (2)
    • ►  February (1)
    • ►  January (2)
  • ►  2012 (5)
    • ►  December (4)
    • ►  October (1)
  • ►  2011 (8)
    • ►  August (4)
    • ►  July (4)
  • ►  2010 (1)
    • ►  November (1)
  • ►  2009 (1)
    • ►  July (1)
Simple theme. Powered by Blogger.