[TYPO3-english] Converting DATE to INT

Andreas Becker ab.becker at web.de
Sat Nov 14 10:08:37 CET 2009

Thanks Jigal

This helped a lot


On Sat, Nov 14, 2009 at 3:01 PM, Jigal van Hemert <jigal at xs4all.nl> wrote:

> Hi Andi,
> Andreas Becker wrote:
>> Does anybody know a way to CONVERT the DATE to INT so that the typo3 value
>> will be available again in the database for the extensions to be used.
> Assuming that you already found that the MySQL DATE format has a much
> larger range than a UNIX timestamp (the INT you refer to) and that the dates
> are all in the range of a timestamp, you can easily convert them using a
> small query with the UNIX_TIMESTAMP() function.
> UPDATE `table1` SET `intcolumn` = UNIX_TIMESTAMP(`datecolumn`);
> [1]
> http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_unix-timestamp
> Regards, Jigal.
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

More information about the TYPO3-english mailing list