to_date problem - Mailing list pgsql-interfaces

From leif@danmos.dk
Subject to_date problem
Date
Msg-id 200103150737.f2F7bQl13172@crysberg.dk
Whole thread Raw
Responses Re: to_date problem  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-interfaces
Hello,

  I have just observed the following problem:

-------------------------------------------------------------------
testdb=# select to_date('2001-3-5 10:00', 'YYYY-MM-DD HH24:MI') from dual;
  to_date
------------
 2001-03-10
(1 row)

testdb=# \q
[nsadmin@ljserv calendar]$ psql --version
psql (PostgreSQL) 7.1beta3
contains readline, history support
Portions Copyright (c) 1996-2000, PostgreSQL, Inc
Portions Copyright (c) 1996 Regents of the University of California
Read the file COPYRIGHT or use the command \copyright to see the
usage and distribution terms.
-------------------------------------------------------------------

   I know that the date constant is not in the same format as the format
string, but shouldn't it be an error rather than 'just' returning a
wrong date?

    Any suggestions,

  Leif
  (leif@danmos.dk)

pgsql-interfaces by date:

Previous
From: Stéphane EVEILLARD
Date:
Subject: Big trouble with libpq++
Next
From: Karel Zak
Date:
Subject: Re: to_date problem