Breaking up the publication date

Posted by Community Admin on 03-Aug-2018 16:03

Breaking up the publication date

All Replies

Posted by Community Admin on 27-Jan-2011 00:00

Hi all,

I'm trying to modify the News template and break the month, day, and year of the publication date into separate divs for styling purposes. Thus far, everything I've tried throws an exception. Is there a way to format the PublicationDate.ToLocal() to only return one part at a time?

Posted by Community Admin on 27-Jan-2011 00:00

Figured it out moments after hitting Post.

<div class="publicationDate">
    <div class="day">
        <sf:FieldListView ID="PublicationDateDay" runat="server" Format="PublicationDate.ToLocal():dd" />
    </div>
    <div class="month">
        <sf:FieldListView ID="PublicationDateMonth" runat="server" Format="PublicationDate.ToLocal():MMM" />
    </div>
    <div class="year">
        <sf:FieldListView ID="PublicationDateYear" runat="server" Format="PublicationDate.ToLocal():yyyy" />
    </div>
</div>

This thread is closed