ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom Date Field Format

March 04, 2011 12:36pm

Subscribe [2]
  • #1 / Mar 04, 2011 12:36pm

    vacquah

    355 posts

    In html, my date code looks something like this:

    <time datetime={entry_date format="%F %d %Y"} pubdate>{entry_date format="%F %d %Y"}</time>


    I am looking to break up the components of the date field ( day, month, year) so I can style them separately. My end goal will look something like this:

    01/22
    .........
    2011


    Not sure how? ideas?

  • #2 / Mar 04, 2011 9:41pm

    John St-Amand

    865 posts

    In html, my date code looks something like this:

    <time datetime={entry_date format="%F %d %Y"} pubdate>{entry_date format="%F %d %Y"}</time>


    I am looking to break up the components of the date field ( day, month, year) so I can style them separately. My end goal will look something like this:

    01/22
    .........
    2011


    Not sure how? ideas?

    Yeah, just repeat the variable. So:

    {entry_date format="%m/%j"} : {entry_date format="%Y"}

    Would return 01/22 : 2011 and you could style each part separately.

  • #3 / Mar 05, 2011 12:10am

    vacquah

    355 posts

    wonderful - thanks

  • #4 / Mar 05, 2011 10:04am

    John St-Amand

    865 posts

    No sweat.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases