开发者

GridView cell Date Format

开发者 https://www.devze.com 2023-01-09 21:39 出处:网络
I 开发者_如何转开发want to format Date of the GridView Cell text like ddMMMYYYY (i.e) 07MAY2010 how to achieve this?

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 = ......?

}


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

0

精彩评论

暂无评论...
验证码 换一张
取 消