[TYPO3-english] typoscript where clause with date functions?

horace grant horace3d at gmail.com
Sun Feb 17 10:26:38 CET 2013


On Sun, Feb 17, 2013 at 9:17 AM, Jigal van Hemert <
jigal.van.hemert at typo3.org> wrote:

> Hi,
>
>
> On 16-2-2013 23:01, horace grant wrote:
>
>> i am trying to do a query with typoscript and i have to compare dates.
>>
>> i tried stuff like this:
>>
>> where = UNIX_TIMESTAMP() < UNIX_TIMESTAMP(day)
>>
>> but it didn't seem to work. day is a "date" field of my kickstarter
>> extension.
>>
>
> If you used the kickstarter to create the date field then it's already
> stored as a Unix timestamp (it's an integer field in the database and the
> TYPO3 backend displays it as a date).
>
> In that case you can use TypoScript to compare it to the current timestamp:
>
> select {
>   [...]
>   where = ###NOW### < day
>   markers {
>     NOW.data = date:U
>   }
> }


awesome! :) thank you very much!

bye,
horace


>
>
>
> --
> Jigal van Hemert
> TYPO3 Core Team member
>
> TYPO3 .... inspiring people to share!
> Get involved: typo3.org
>
> ______________________________**_________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**english<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english>
>


More information about the TYPO3-english mailing list