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

    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
  2. Fiko
    Admin
    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.

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top