From: THOMPSON, JARED (ATTBAPCO) <JT060b@ATT.COM>
To: spam_eater@gmx.net
Cc: pgsql-sql@postgresql.org
Subject: Re: to_char() accepting invalid dates?
Date: Fri, 29 Jul 2011 13:48:50 -0400
Message-ID: <377C0288D30BE04BA7B5FD60BDFC0C911A6F7040@crexc52p> (raw)
ERROR at line 1:
ORA-01839: date not valid for month specified
That error is coming on
select to_date('20110231', 'YYYYMMDD') from dual;
because there are not 31 days in February 2011, try this:
select to_date('20110228', 'YYYYMMDD') from dual;
Jared Thompson
Internet Operations Group
Office: 678.406.2895
jt060b@att.com <mailto:kyle.dungan@att.com>
This e-mail and any files transmitted with it are AT&T property, are
confidential, and are intended solely for the use of the individual or
entity to whom this email is addressed. If you are not one of the named
recipient(s) or otherwise have reason to believe that you have received
this message in error, please notify the sender and delete this message
immediately from your computer. Any other use, retention, dissemination,
forwarding, printing, or copying of this e-mail is strictly prohibited.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: JT060b@ATT.COM, spam_eater@gmx.net
Subject: Re: to_char() accepting invalid dates?
In-Reply-To: <377C0288D30BE04BA7B5FD60BDFC0C911A6F7040@crexc52p>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox