Re: Formatting a date column retrieve from a table

From: Date: Tue, 10 Oct 2000 14:30:20 +0000
Subject: Re: Formatting a date column retrieve from a table
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19356@lists.php.net to get a copy of this message
Hi Jon: > I am beginnig with php and I am trying to format, with local settings, a > date column. Following php manual I would like to use DATE function, anyway > I do not know the way to convert the retrieved date to a timestamp that is > one of the requiered arguments of this function. Which database engine are you using? Anyway, their date is probably stored as 2000-10-10, or some similar format. As you said, you need a Unix timestamp to do anything. One option is to use the databases functions to generate the timestamp. For example, MySQL has a UNIX_TIMESTAMP() function. The other option is to use PHP's mktime() function. Enjoy, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#19356) next »