sscanf() question...

From: Date: Wed, 17 Oct 2001 21:25:25 +0000
Subject: sscanf() question...
Groups: php.general 
Request: Send a blank email to php-general+get-71407@lists.php.net to get a copy of this message
I am trying to write a script to convert a MySQL timestamp (YYYYMMDDhhmmss) to a unix timestamp. I wanted to use the following code to do it: list($year,$month,$date,$hour,$minute,$second) = sscanf($mysqltimestamp, %4d%2d%2d%2d%2d%2d); $unixtimestamp = mktime($hour,$minute,$second,$month,$date,$year); Thing is, I'm not sure if sscanf() can take that kind of format. I am getting a parse error on the first line, and I'm not sure why. Can anyone shed some light on this for me please? TIA. -- Uchendu Nwachukwu unndunn AT yahoo DOT com - www.unndunn.com

« previous php.general (#71407) next »