[PHP] Re: [PHP-DB] date format and postgreSQL... From: Alexey Borzov (borz_off <email protected>)
Date: 11/10/00

Greetings, Javier!

The best solution is to use ISO-8601 format exclusively. That is
'yyyy-mm-dd'. You should convert you date to iso when you insert it, to
prevent ambiguity with dates like '2/10/2000'.
Before doing your SELECT, issue
SET DATESTYLE TO 'iso'
and output will be in iso-8601 as well...

At 09.11.2000, 11:10, you wrote:
JMM> I'm using PostgreSQL, and I have problems to understend date management...

JMM> I execute the next insert commands...
JMM> insert into test values ('any1', '2/11/2000')
JMM> insert into test values ('any1', '2/10/2000')
JMM> insert into test values ('any1', '20/10/2000')

JMM> But when I do a select * from test:
JMM> any|02-11-2000
JMM> any|02-10-2000
JMM> any|10-20-2000

JMM> And, When I'm reading my recorset I have a date with "dd-mm-yyyy" and
JMM> another date with "mm-dd-yyyy"...

JMM> What's going on?...

-- 
Yours, Alexey V. Borzov, Webmaster of RDW

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>