Re: Date Anomaly?? - Mailing list pgsql-sql

From Ian Barwick
Subject Re: Date Anomaly??
Date
Msg-id 200305062319.42247.barwick@gmx.net
Whole thread Raw
In response to Date Anomaly??  (Thomas Good <tomg@sqlclinic.net>)
Responses Re: Date Anomaly??  (Thomas Good <tomg@sqlclinic.net>)
List pgsql-sql
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@gmx.net



pgsql-sql by date:

Previous
From: Steve Crawford
Date:
Subject: Re: pgsql Replication Proxy (was Re: Replication for a
Next
From: Matt Mello
Date:
Subject: "deadlock detected" documentation