date conflict with old news archive

This is a discussion on date conflict with old news archive within the PHP General forums, part of the PHP Programming Forums category; God i hope this is simple :) I have news bloggs section on my site. At present the news is loaded ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-23-2003
\
 
Posts: n/a
Default date conflict with old news archive

God i hope this is simple :)
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

cheers
Paul
Reply With Quote
  #2 (permalink)  
Old 09-23-2003
Paul Ferrie
 
Posts: n/a
Default Re: [PHP] date conflict with old news archive

Cheers your a star :)

"Eugene Lee" <list-php@fsck.net> wrote in message
news:20030923202437.GD1583@localhost.Earthlink.net ...
> 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);

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:54 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0