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.

Working with dates

June 20, 2011 2:29pm

Subscribe [3]
  • #1 / Jun 20, 2011 2:29pm

    wbdzynr

    137 posts

    I have an entry in a “calendar” channel that I would like to display in the sidebar only on week days.  Is it possible to do something like

    {if {current_time format="%D"} == "Mon" OR {current_time format="%D"} == "Tue"  } 
    display the title here
    {/if}

    If not, is there another way that I could do this? 

    Thanks!

    Todd

  • #2 / Jun 21, 2011 6:39am

    John Henry Donovan

    12339 posts

    Todd,

    that should work for you. Just adjust the syntax slightly

    {if "{current_time format="%D"}" == "Mon" OR "{current_time format="%D"}" == "Tue"  } 
    {title}
    {/if}
  • #3 / Jun 21, 2011 11:21am

    wbdzynr

    137 posts

    Ahhh, so close, yet so far away…

    Worked perfect - THANK YOU!!!

    Todd

  • #4 / Jun 21, 2011 11:55am

    Sue Crocker

    26054 posts

    Glad John was able to help. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases