This is a migrated thread and some comments may be shown as answers.

Date formatting on rotator example

1 Answer 22 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sayitfast
Top achievements
Rank 2
sayitfast asked on 26 Aug 2009, 12:06 AM
Hello,

Quick question... on this example:
http://demos.telerik.com/aspnet-ajax/rotator/examples/livexml/defaultcs.aspx

How can i format the date in the code block?

Thanks for any help

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 26 Aug 2009, 10:29 AM
Hi Rhett,

This is a common programming task, and a possible solution is to use this approach :
 <%# DateTime.Parse(XPath("pubDate"as string).ToString("d") %> 

And pass the desired formatting string to the ToString() function.

I hope this helps.

Regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
sayitfast
Top achievements
Rank 2
Answers by
Fiko
Telerik team
Share this question
or