On Tuesday 06 May 2003 22:05, Thomas Good wrote:
> Hi!
>
> When I run this from the psql monitor:
>
> SELECT SUBSTR(CURRENT_DATE - INTERVAL '1 MONTH',0,11);
> it returns - 2003-04-06 which is the desired behaviour.
>
> Inside a CGI/DBI script it returns:
>
> Sun Apr 06
>
> Anyone have any idea what is going on here!?
Somewhere the datestyle has been set to "PostgreSQL", probably
somewhere in your CGI environment.
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-set.html
Ian Barwick
barwick(at)gmx(dot)net