Date formatting on rotator example

2 posts, 0 answers
  1. sayitfast
    sayitfast avatar
    57 posts
    Member since:
    Oct 2006

    Posted 25 Aug 2009 Link to this post


    Quick question... on this example:

    How can i format the date in the code block?

    Thanks for any help
  2. Fiko
    Fiko avatar
    1406 posts

    Posted 26 Aug 2009 Link to this post

    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.

    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.
Back to Top