Re: date conflict with old news archive

From: Date: Tue, 23 Sep 2003 20:24:37 +0000
Subject: Re: date conflict with old news archive
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-163627@lists.php.net to get a copy of this message
On Tue, Sep 23, 2003 at 09:01:19PM +0100, [ PAUL FERRIE ] wrote: : : God i hope this is simple :) It is. I think. :-) : I have news bloggs section on my site. At present the news is loaded in : from a txt file, most of the site is now running with most sections being : loaded via mysqldb's. : I would like to add the old entries to the new db that i have setup for the : bloggs. : My problem is converting the date format from 12-08-03 to the time stamp to : be stored int the db. It has to be done this way as new entries will be : using the time stamp : : So in the php file i have : $dateAdded = time(); : but time would then be 1064245532 : i need : date=12-08-03 : $dateAdded = date(convert) to time stamp $dateAdded = mktime(0, 0, 0, 12, 8, 2003);

« previous php.general (#163627) next »