how to use date field in grid view please help me.with example.
thanks.....
How to use date in grid view
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Gohil JayendrasinhRank #490 · 5K reputationPosted Mar 21, 2012, 8:53 PM EDT
hi
if you use bound field then
Or if you use label then
asp:TemplateField HeaderText="Color"> ItemTemplate> asp:Label ID="lblDate" runat="server" Text='# Eval("Your_Date_Column", "{0:MMMM d, yyyy}") %>' /> ItemTemplate> asp:TemplateField>You can set custom date format like
http://www.aspdotnet-suresh.com/2011/05/how-to-set-date-format-in-gridview.html
if it's helpful to you then please check Accepted Asnwers
Thanks