.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson
Eminent IT

Home >> Code Snippets >> DateTime >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Date Formating in GridView

Posted By:Syed Shakeer Hussain       Posted Date: March 05, 2010    Points: 10    Category: DateTime    URL: http://www.dotnetspark.com  

Date Formating in GridView. This article will discuss how you can format data that is displayed in grid view rows

Date Formating in GridView?

This article will discuss how you can format data that is displayed in grid view rows

d}" HeaderText="DaDate"  />

 Format               PatternName                                              Example
                       Short date format                                            8/27/1989

 D                       Long date format                                            Sunday, August 27, 1989
 t                        Short time format                                            3:32 PM
 T                       Long time format                                             3:32:00 PM
 f                        Full date/time format(short time)                       Sunday, August 27, 1989 3:32 PM
 f                        Full date/time format(long time)                        Sunday, August 27, 1989 3:32:00 PM
                      General date/time format(short time)                  8/27/1989 3:32 PM
 G                     General date/time format(long time)                   8/27/1989 3:32:00 PM
 m or M              Month day format                                            August 27
 r or R                RFC 1123 format                                             Sun, 27 Aug 1989 8:32:00 GMT
 s                      Sortable date/time format                                  1989-08-27T15:32:00
 u                      Universable sortable date/time format                 1989-08-27 15:32:00z
 U                     Universable sortable date/time format                  Sunday, August 27, 1989 11:32:00 PM
 y or Y              Year month format                                             August, 1989


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend