[TYPO3-english] Time comparison
Wolfgang Klinger
wolfgang at stufenlos.net
Mon May 11 18:12:37 CEST 2009
*hiya!*
On May 11, 2009, at 5:47 PM, Sergio wrote:
> I would like to do something like this to know what the last content
> items were 5 minutes ago:
>
> SELECT uid, title, crdate
> FROM tt_content
> WHERE crdate >= SUBTIME(SYSDATE(), "0 0:5:0.0000000")
>
> but time formats are different in the comparison.
try MySQL's FROM_UNIXTIME function to format your unix timestamp
(crdate):
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_from-unixtime
bye
Wolfgang
More information about the TYPO3-english
mailing list