1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / News Module Date Code Question

News Module Date Code Question

2 posts, 0 answered
  1. Lou
    Lou avatar
    30 posts
    Registered:
    11 Aug 2011
    17 Jan 2012
    Link to this post
    Does anyone know a way to combine:

    <sf:FieldListView ID="PostDate" runat="server" Format=" | {PublicationDate.ToLocal():MMM dd, yyyy}" /> 

    with this:

     <asp:Literal runat="server" Text='<%# Eval("ActualPubDate")%>'/>

    So this part:

    .ToLocal():MMM dd, yyyy

    works in the:

    ActualPubDate

    Thank you, 
    Lou

  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    19 Jan 2012
    Link to this post
    Hi,

     You can call String.Format method inside the binding tags and format the returned value the way you like. Here's an article that has some sample code, that you can use:
    http://www.velocityreviews.com/forums/t83939-format-a-date-from-a-databinder-eval.html 

    Kind regards,
    Svetoslav Petsov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered