开发者

GridView cell Date Format

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜