News Module Date Code Question

Posted by Community Admin on 03-Aug-2018 17:55

News Module Date Code Question

All Replies

Posted by Community Admin on 17-Jan-2012 00:00

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

Posted by Community Admin on 19-Jan-2012 00:00

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

This thread is closed