3

I'm using a date field type to display the date of an upcoming event, but when its rendered it displays as a string of numbers. For example, one date displays as "1356393654". I'm not using any plug-ins, and I've already set the date formatting, which doesn't seem to have an effect. Any ideas?

    <ul class="upcoming-events>
        <li class="section-post">
            {exp:channel:entries channel="home" disable="categories|member_data|pagination" sort="asc"}
            <h3><img src="{site_url}/images/interface/noun_project_8151.svg" width="18" alt="calendar"> {title}</h3>
            <h5>{event_date format=%D, %F %d, %Y}</h5>
            <p>{event_details}</p>
            {/exp:channel:entries}
        </li>
    </ul>
4
  • 1
    I guess your forgot the '' between your format date => {event_date format='%D, %F %d, %Y'} – Simon Dec 24 '12 at 14:44
  • Simon, you ought to add that as an answer instead of a comment, as you are correct. – Nick Benson Dec 24 '12 at 14:47
  • I really don't know If I'm correct or not. I'll put it if it fix the problem. – Simon Dec 24 '12 at 14:49
  • wow...that was dumb. thank you Simon! Sometimes you just get lost in the code and can't see what should be REALLY obvious. thanks again! – Jon Dec 24 '12 at 14:50
3

You forgot the '' in your tag :

<h5>{event_date format=%D, %F %d, %Y}</h5>

Correct :

<h5>{event_date format='%D, %F %d, %Y'}</h5>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.