[[+content_image]]
V
V
Vyacheslav Yashnikov2016-09-03 20:58:11
MODX
Vyacheslav Yashnikov, 2016-09-03 20:58:11

How to sort through TVFilters events whose date is later than today, hours, minutes?

Good afternoon,
I'm making a site on Modx Revo, I can't filter events with a date later than today, I display events through getResurses, nothing is displayed at all:

[[getResources?
    &parents=`8`
    &tpl=`ImmediateEvent`
    &includeContent=`1`
  &includeTVs=`EventDate`
  &processTVs=`1`
  &tvFilters=`EventDate>=[[!toDate]]`
    &limit=`4444`
    ]]

Tv Event Date parameter outputs: 09/17/2016, 13:30
The toDate snippet displays: 09/03/2016, 20:09,
the snippet itself:
<?php
    echo date("d.m.Y, H:m");

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
V
Vyacheslav Yashnikov, 2016-09-13
@VyacheslavY

Brought it out like this:

<?php
echo date("Y-m-j" ." ". "H:m:s");

[[!pdoResources:default=`<div style="float: left; width: 100%; color: #5a5a5a; text-align: center; font-size: 15px; line-height: 18px;">Нет ближайших мероприятий</div>`?
    &tpl=`ImmediateEvent`
    &includeTVs=`1`
    &parents=`8`
    &includeContent=`1`
    &includeTVs=`EventImage, EventDate`
    &processTVs=`1`
    &limit=`4444`
    &where=`["EventDate >= NOW()"]`
    ]]

S
Sergey, 2016-09-07
@Derzaiii

Do you have Pdotools?
If not, install and try like this:

[[Pdoresources?
    &parents=`8`
    &tpl=`ImmediateEvent`
    &includeContent=`1`
    &includeTVs=`EventDate`
    &processTVs=`1`
    &where=`{"EventDate:>=":"[[!toDate]]"}`
    &limit=`4444`
    ]]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question