Converting xml dates in Gridview?

Emm

Joined
Oct 31, 2007
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top