RE: [PHP] How to convert '2001032018' -> '2001 03 20 18' ? (Fomat ing Date)

From: Date: Tue, 20 Mar 2001 19:14:57 +0000
Subject: RE: [PHP] How to convert '2001032018' -> '2001 03 20 18' ? (Fomat ing Date)
Groups: php.general 
Request: Send a blank email to php-general+get-44804@lists.php.net to get a copy of this message
You could try this: function convertTimeStamp($yourTimeStamp) { $strTime[0] = substr($yourTimeStamp, 0,4); $strTime[1] = substr($yourTimeStamp, 4,2); $strTime[2] = substr($yourTimeStamp, 6,2); $strTime[3] = substr($yourTimeStamp, 8,2); return $strTime; } Josh Hoover KnowledgeStorm, Inc. jhoover@knowledgestorm.com Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here > I'm trying to convert the timestamp '2001032018' into '2001 > 03 20 18' or an > Array which I can easily format. Do you remember any date or > string function > I can use?

« previous php.general (#44804) next »