OK Thanks for that. Clears things up a bit for me.

Would that also explain why my php format date script is returing:

        02:14 19 Jan 2038 

all the time?

Is there a neat php way to format a value like this 20030320085056 into
something readable for us mortals?

-----Original Message-----
From: Del [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 March 2003 9:33 AM
To: Robert Maurency
Subject: Re: [SLUG] PHP MySQL help


Robert Maurency wrote:
> I've got a MySQL question for you.
> 
> Is the php value <?echo time();?> suitable for a MySQL timestamp field?

No.

If you have a timestamp field in MySQL it is automatically generated when
you save (update?) a record.  There's no need to put anything into it.

If you want to store dates, you probably want to use a datetime field which
is a "string" of some format (YYYY-MM-DD hh:mm:ss).  And no, you can't just
use echo time() to generate that.

-- 
Del

*************************************************************
This mail, including any attached files may contain
confidential and privileged information for the sole
use of the intended recipient(s). Any review, use, 
distribution or disclosure by others is strictly prohibited.
If you are not the intended receipient (or authorised to 
receive information for the recipient), please contact 
the sender by reply e-mail and delete all copies of
this message.
*************************************************************
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to