[TYPO3-dev] transforming variables to date values (int(11))

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Sat Jun 23 23:45:15 CEST 2007


Am Sat, 23 Jun 2007 23:24:38 +0200 schrieb Christian Hensel:

> Hi Developers,
> all around there. i just recently started extension programming with typo3,
> so my question might be easy.
> 
> in my extension users enter dates and times in the following way:
> 
> statdate: 13-06-2007
> starttime 1200
> 
> In order, that i might save them in the Database i have to transform an 
> combine them to
> int(11) Values.
> Any advice how to do that?
> 
> i thought strtotime(); should work, but don't now hot to combine both 
> data...
> '.strtotime($this->piVars['starttime']).'
> 
> regards
> Christian

Some years ago I did it with strtotime. Seems to be a good solution.

http://typo3.org/extensions/repository/view/vcd_library/0.1.0/info/class.tx_vcdlibrary.php/

See function makeTime.


Regards

Elmar




More information about the TYPO3-dev mailing list