Re: convert mysql datetime to unix timestamp

From: Date: Mon, 28 Jul 2003 16:38:02 +0000
Subject: Re: convert mysql datetime to unix timestamp
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157203@lists.php.net to get a copy of this message
Chris Hayes (SENSE) wrote:
i have to move data from a table with a datetime (2003-05-14 13:36:04) to a unix timestamp (e.g. 2147483647) . Any ideas?
ALTER TABLE Table ADD COLUMN unix_time_column INT; UPDATE Table SET unix_time_column = UNIX_TIMESTAMP(mysql_time_column); -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com

« previous php.general (#157203) next »