views:

24

answers:

2

I want to format Date of the GridView Cell text like

ddMMMYYYY
(i.e)
07MAY2010

how to achieve this?

RowDataBound()
{
....

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

}
+2  A: 

Do foramte string as shown below do work for you

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

with out /

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

More : String Format for DateTime

Pranay Rana
hi i need without "/" (i.e) 09JUN2010 something like that,it is the requirement
guru
answer is updated now
Pranay Rana
A: 

Have a look at this

http://msdn.microsoft.com/en-us/library/az4se3k1.aspx

Dorababu