Re: Date type: DATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



>   $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



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux