Hi all!
I have a Gridview which is bound to a dataset with a datecolumn with dates like 2004-08-23T09:57:27.1430000+02:00 (xml-standard).
Now I want the Gridview to display the dates like yyyy-mm-dd.
I have tried converting with DateFormatString with no success:
<asp:BoundField HeaderText="Saved date" DataField="Saved" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" />
Seems like yyyy-mm-ddThh:mm:ss is not recognised as a valid datetime?
What am I doing wrong? Any help much appreciated
Regards,
Emm
I have a Gridview which is bound to a dataset with a datecolumn with dates like 2004-08-23T09:57:27.1430000+02:00 (xml-standard).
Now I want the Gridview to display the dates like yyyy-mm-dd.
I have tried converting with DateFormatString with no success:
<asp:BoundField HeaderText="Saved date" DataField="Saved" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" />
Seems like yyyy-mm-ddThh:mm:ss is not recognised as a valid datetime?
What am I doing wrong? Any help much appreciated
Regards,
Emm