I'm trying to compare date from TV with date from snippet ( i'm using &tvFilters) (or any other date string) but works only == and != operations? but i need to make >= and <=, what's wrong? examples say that it's must work, can it be some MYSQL problem? looks like it's compares like strings...
[[!getResources? &showHidden=`1` &processTVs=`1` &includeTVs=`1`
&tpl=`rotatorPost` &includeContent=`1` &parents=`5` &limit=`3`
&tvFilters=`Date>=2016-01-19 00:00:00` ]]
You are going to have to make sure both dates are converted to unix timestamps [the TV probably already is]
You will have to retrieve your TV "Date" either unprocessed [&processTVs=0
] or set it's output type to numeric.
Your snippet will have to provide the date as a numeric type as well.
In any case, you will have to check to docs to make sure getResources will not treat either value as a stringor else:
&tvFilters=1453239348 >= 1453239399
is going to give you unexpected results.
though the docs look good in that respect:
New filter operators available in 1.4.2-pl Starting with release 1.4.2-pl of getResources, there are a number of new comparison operators for use when creating filter conditions. In addition, when using many of these new operators, numeric comparison values are automatically CAST TV values to numeric before comparison. Here is a list of the valid operators: