Date Anomaly??

From: Thomas Good <tomg(at)sqlclinic(dot)net>
To: Postgres SQL List <pgsql-sql(at)postgreSQL(dot)org>
Subject: Date Anomaly??
Date: 2003-05-06 20:05:57
Message-ID: Pine.LNX.4.44.0305061603070.9996-100000@q8.nrnet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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!?

Thanks!

-----------------------------------------------------------------------
Thomas Good e-mail: tomg(at)sqlclinic(dot)net
Programmer/Analyst phone: (+1) 718.818.5528
Residential Services fax: (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY mobile: (+1) 917.282.7359

// Das ist die Kunst - wie man alles verhunzt.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Crawford 2003-05-06 20:42:42 Re: pgsql Replication Proxy (was Re: Replication for a
Previous Message Michael A Nachbaur 2003-05-06 20:01:43 Re: pgsql Replication Proxy (was Re: Replication for a