2010-07-31 6 views
1

Je veux formater Date du texte Cell GridView commeGridView cellulaire Format de date

ddMMMYYYY 
(i.e) 
07MAY2010 

comment y parvenir?

RowDataBound() 
{ 
.... 

e.Row.Cells[10].Text = ......? 

} 
+0

accepter ans si ça marche pour vous –

Répondre

2

Do chaîne foramte comme indiqué ci-dessous ne fonctionnent pour vous

e.Row.Cells[10].Text =String.Format("{0:dd/MMM/yyyy}", dt); 

avec out/

e.Row.Cells[10].Text =String.Format("{0:ddMMMyyyy}", dt) 

Plus: String Format for DateTime

+0

salut i besoin sans "/" (ie) 09JUN2010 quelque chose comme ça, c'est l'exigence – guru

+0

réponse est mise à jour maintenant –