Re: mySql timestamp

From: Date: Mon, 07 Aug 2000 15:19:56 +0000
Subject: Re: mySql timestamp
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10485@lists.php.net to get a copy of this message
Hi Bryan: Bryan Fritchie wrote: > > SELECT fieldname, DATE_FORMAT(timestamp, '%l:%i:%s %p') as timestamp > FROM tablename > WHERE timestamp > now() - 900 ' 15 minutes * 60 seconds? > ORDER BY timestamp DESC MySQL timestamp is yyyymmddhhmmss timestamp. The timestamp returned by now() is a Unix timestamp with seconds since the "epoch." A similar question was asked and answered the night before you posted. Look at the mailing list archive. There, you'll find some helpful code for converting between the two time formats. --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 (#10485) next »