Re: Date Anomaly??

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Thomas Good <tomg(at)sqlclinic(dot)net>, Postgres SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Date Anomaly??
Date: 2003-05-06 21:19:42
Message-ID: 200305062319.42247.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Matt Mello 2003-05-06 21:48:17 "deadlock detected" documentation
Previous Message Steve Crawford 2003-05-06 20:42:42 Re: pgsql Replication Proxy (was Re: Replication for a