0

Overview:

  • current time 10:00PM
  • event_start_date - is a date field
  • trying to display all entries from today and all future entries
  • i understand >={current_time} includes the time as well but start_on='today' doesn't seem to include entirety of today

Issue:

  • It excludes entries that are past the current time and doesn't
  • how do you include all entries from the start of today.

List

  • 2016-02-08
  • 2016-03-01
  • 2016-03-29
  • 2016-05-02
  • 2016-05-15
  • 2016-05-17 (9:50 PM)
  • 2016-05-18
  • 2016-05-18
  • 2016-05-30
  • 2016-09-12
  • 2016-10-24
  • 2016-11-01
  • 2016-12-06

Code:

{exp:channel:entries channel="events" search:event_start_date=">={current_time}"
    {event_start_date format='%Y-%m-%d'}
{/exp:channel:entries}
0

You could try adding date format information to the time entries. Something like:

{exp:channel:entries channel="events" search:{event_start_date format='%Y-%m-%d'}=">={current_time format='%Y-%m-%d'}"}
    {event_start_date format='%Y-%m-%d'}
{/exp:channel:entries}

The documentation is not clear on how these comparisons are made, but reading across from how comparisons of relative dates are handled suggests that adding format to the date should (or could) work. Worth a try I think.

HTH

| improve this answer | |

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.