We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37242 ☆ A M B ☆
    • 339 Posts
    Hey MODX people,

    I'd like to filter the output of getResources by the current date. I have "event" as a template with "eventdate" as a TV.

    I use the snippet "toDay" go get.. well: today smiley
    return date("Y-m-d");


    My getResources call contains this:
    &tvFilters=`Eventdate>=[[!toDay]]`


    As these two formats are different, I dont know how to compare them. Its easy to display them in the same format, but in the tvFilters, I dont have this opportunity. Have I?

    Its important for me that a 1pm event does not disappear at 2pm. So it's really "today".

    Cheers,

    Guido [ed. note: gallenkamp last edited this post 14 years ago.]
      • 37242 ☆ A M B ☆
      • 339 Posts
      It seems like I have found something.

      When I display different tv.eventdate, I get different formats:

      2012-12-31 23:45:00

      and
      24-03-2012 21:30:00


      That is why I always get too much resources. I imported about 800 resources from an evo site a time ago. Is it possible that the time format there is really different from the revo format of TVs type "date"? Thats no good...
        • 37242 ☆ A M B ☆
        • 339 Posts
        Found a solution by editing the values via regex in notepad++ after exporting and replacing the database table. Will link to my blogpost here in a few minutes.
          • 37242 ☆ A M B ☆
          • 339 Posts