PDA

View Full Version : [CLOSED] datetime format issue?



hdsoso
May 12, 2014, 4:09 AM
how to format CollectDate in db which value is 2014/5/11 23:13:12


<ext:ModelField Name="CollectDate" Type="Date"></ext:ModelField>



<ext:Column ID="Column2" runat="server" DataIndex="CollectDate" Text="操作时间"></ext:Column>


but it shows :
Sun May 11 2014 23:13:12 GMT+0800 (中国标准时间)

i want show yyyy-MM-dd format

geoffrey.mcgill
May 12, 2014, 4:27 AM
Hi,

How about using an <ext:DateColumn>?

You can also control the formatting in the DateColumn using the .Format property.

Hope this helps.

hdsoso
May 12, 2014, 4:44 AM
Hi,

How about using an <ext:DateColumn>?

You can also control the formatting in the DateColumn using the .Format property.

Hope this helps.

thank you ,
just use
<ext:DateColumn ID="Column2" runat="server" DataIndex="CollectDate" Text="操作时间" Format="yyyy-MM-dd"></ext:DateColumn>