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.

simple question re: date format

April 19, 2011 6:07pm

Subscribe [2]
  • #1 / Apr 19, 2011 6:07pm

    strudel

    195 posts

    Greetings,

    Hmm, don’t know if this is a totally stupid question or not, but:

    I was checking the user guide regarding date formats, and found the following:

    {date format="%F %d %Y"}

    When I tried using that, all I get is “{date format="%F %d %Y"}” (it’s not rendered as the date, but just as the code).

    However, when I use

    {current_time format="%F %d %Y"}

    I get the date as I’m expecting.

    Just curious what is going on with that. Thanks in advance.

  • #2 / Apr 19, 2011 7:41pm

    Mark Bowen

    12637 posts

    I think perhaps the wording might need updating in the documentation as what is meant by {date format=""} is if you had a custom field with the name of date.

    The current_time works as that is an actual built in date variable.

    Best wishes,

    Mark

  • #3 / Apr 19, 2011 7:42pm

    strudel

    195 posts

    Thanks Mark.

    I was thinking it was something like that, it just wasn’t clear to me.

    Cheers!

  • #4 / Apr 20, 2011 12:35am

    Lisa Wess

    20502 posts

    Hey guys,

    Yes, the {date} is just a sample variable - not a real one.  It’s intended to just be an example of how you’d use format=, it may be worth us changing that to a global variable that actually works. I’ll flag that with our documentation team.

    Other than that, you guys are all set?

  • #5 / Apr 20, 2011 1:12am

    strudel

    195 posts

    Yup, that’s clear now to me. It was just a bit confusing to see it written as code you would insert, so perhaps a little touch-up in the documentation would be good.

    Thanks!

  • #6 / Apr 20, 2011 1:13am

    Lisa Wess

    20502 posts

    No worries, strudel.  Already sent to my team!

    If anything else comes up, just let us know.  Thank you.

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

ExpressionEngine News!

#eecms, #events, #releases