...DATE_SUB(NOW(), INTERVAL 60 DAY) > publishedon...
Anyone got any clues on this?gR output depending on a date is possible. Can be used for events, like "upcoming" or "see it now". The math-date thing my require a snippet, but I am not sure.
glad to know it's possible. Quote from: unsub777 at Feb 03, 2013, 05:45 PMAnyone got any clues on this?gR output depending on a date is possible. Can be used for events, like "upcoming" or "see it now". The math-date thing my require a snippet, but I am not sure.
Since the manager does not like the iPad, I can only go into details by tomorrow, when I am at the desktop again. ;-)
<?php /* stringToTime snippet */ return strtotime($input);
&where=`{"publishedon": [[!stringToTime? &input=`-60 days`]] }`&where=`{"publishedon": [[!++publishedon_time_setting:strtotime]] }`cheersglad to know it's possible.
I might play around with it a bit today; I suppose I could use some output modifiers in the template to only show the gR results from beoyond a certain point... I don't know, it seems like I'm missing something obvious. I'm going to have a facePalm moment sometime today, almost certainly.
Any insight you have will be much appreciated. thnx!
<h2>Noy playing in the cinemas</h2> [[!getResources? &parents=`2` &tvFilters=`cinemaReleaseDate<=[[!dateToday]]%` &sortbyTV=`cinemaReleaseDate` &sortdirTV=`DESC` &includeTVs=`1` &tpl=`movieListCinema` ]] </div>
<?php
return date("Y-m-d");&where=`{"publishedon:<":[[!stringToTime? &input=`-60 days`]]}`
I never knew the % filter.
@mindEffects: Appreciate your example there, thank you. That may come in handy for something else I'm working on, actuallyNice having been able to help you here.I never knew the % filter.
@openGeek:They are part of PHP. See http://www.php.net/manual/en/datetime.formats.relative.php for more information on relative date/time formats and all supported date/time formats at http://www.php.net/manual/en/datetime.formats.php.
Just a quick follow-up question - the '-60 days' thing... this is not PHP syntax that I'm aware of; so it must be part of ModX... xPDO maybe? Do you have a link to where I can learn more about what you did there? Not having a lot of luck with Google on the subject.

Quote from: unsub777 at Feb 05, 2013, 05:07 PM@openGeek:They are part of PHP. See http://www.php.net/manual/en/datetime.formats.relative.php for more information on relative date/time formats and all supported date/time formats at http://www.php.net/manual/en/datetime.formats.php.
Just a quick follow-up question - the '-60 days' thing... this is not PHP syntax that I'm aware of; so it must be part of ModX... xPDO maybe? Do you have a link to where I can learn more about what you did there? Not having a lot of luck with Google on the subject.