Re: Date type: DATE

Поиск
Список
Период
Сортировка
От Adrian Tineo
Тема Re: Date type: DATE
Дата
Msg-id 001f01c2c2f1$9255d240$f8ddd8d9@supercable.es
обсуждение исходный текст
Ответ на Date type: DATE  (Jesus Rios <galiza-vermelha@wanadoo.es>)
Список pgsql-php
>   $date="$year-$month-$day";
>   insert into s_objetivos_caso values ($dni,$date,$cod_s_objetivos,$conn);

By default, postgresql uses "ISO with US(NonEuropean) conventions" for the
date, wich means mm/dd/yyyy. You can check that with "show datestyle". Of
course, you can change the convention to a European one like dd/mm/yyyy but
I don't know how to make it permanent.... anyway, if we stick to the default
US convention you would do something like:

$date=$month ."/". $day ."/" $year;    // Use the dot (.) to join strings

And then do the insert.

Adrian Tineo


В списке pgsql-php по дате отправления:

Предыдущее
От: Kevin Gordon
Дата:
Сообщение: Re: postgresql primarykeys foreignkeys tablenames
Следующее
От: sector119@mail.ru
Дата:
Сообщение: connect to PostgreSQL over SSL from PHP