[PHP-DB] DATE(r)

2005-09-09 Thread Ron Piggott
Question:

I am trying to for the first time create a table with a column that is
defined as datetime

I wanted to populate that column with the date(r) command.

date(r) on my web site gives this response:

Fri, 9 Sep 2005 13:32:19 -0400

How may I manipulate date(r) to give a format which is compatable to the
column type

-00-00 00:00:00
-MM-DD 24:59:59

Ron

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] DATE(r)

2005-09-09 Thread Bastien Koert

use timestamp column type and populate it by

$date = strtottime(date(r));

then when you want to display it

$date = date('r',$row['datefieldname']);

Bastien



From: Ron Piggott [EMAIL PROTECTED]
Reply-To: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB] DATE(r)
Date: Fri, 9 Sep 2005 12:52:59 -0500

Question:

I am trying to for the first time create a table with a column that is
defined as datetime

I wanted to populate that column with the date(r) command.

date(r) on my web site gives this response:

Fri, 9 Sep 2005 13:32:19 -0400

How may I manipulate date(r) to give a format which is compatable to the
column type

-00-00 00:00:00
-MM-DD 24:59:59

Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] DATE(r)

2005-09-09 Thread Jordan Miller

You need to use:
date('Y-m-d H:i:s');

It's in the comments at:
http://www.php.net/date

Jordan



On Sep 9, 2005, at 12:52 PM, Ron Piggott wrote:



Question:

I am trying to for the first time create a table with a column that is
defined as datetime

I wanted to populate that column with the date(r) command.

date(r) on my web site gives this response:

Fri, 9 Sep 2005 13:32:19 -0400

How may I manipulate date(r) to give a format which is compatable  
to the

column type

-00-00 00:00:00
-MM-DD 24:59:59

Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php