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.

Use time conditionals to display certain data.

February 25, 2009 9:56pm

Subscribe [2]
  • #1 / Feb 25, 2009 9:56pm

    Brian Hildreth

    45 posts

    I am trying to figure out if I can show particular data based off the time of day. I want to show an open/closed business sign on a website based off their hours of operation. I know you can easily show the current time with the

    {current_time}

    .

    How would you evaluate the

    {current_time}

    against another time. Or how would you create a variable and set it to something like 5pm?

    Any thoughts or ideas would be most welcome.

    Moderator’s note: The correct tagt is [ code ], not < code > 😊 Corrected.

  • #2 / Feb 26, 2009 4:38am

    Ingmar

    29245 posts

    Simply use the format= parameter, then evaluate as usual. Easy as pie.

    http://ellislab.com/forums/viewthread/81690/
    http://ellislab.com/forums/viewthread/77711/

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

ExpressionEngine News!

#eecms, #events, #releases