Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7FB5BB5D800 for ; Fri, 29 Jul 2011 14:49:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 44097-06 for ; Fri, 29 Jul 2011 17:49:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail119.messagelabs.com (mail119.messagelabs.com [216.82.241.195]) by mail.postgresql.org (Postfix) with ESMTP id 45B90B5DBBE for ; Fri, 29 Jul 2011 14:49:29 -0300 (ADT) X-VirusChecked: Checked X-Env-Sender: JT060b@ATT.COM X-Msg-Ref: server-4.tower-119.messagelabs.com!1311961768!31513526!1 X-StarScan-Version: 6.2.17; banners=-,-,- X-Originating-IP: [144.160.20.146] Received: (qmail 18923 invoked from network); 29 Jul 2011 17:49:29 -0000 Received: from sbcsmtp7.sbc.com (HELO mlpd194.enaf.sfdc.sbc.com) (144.160.20.146) by server-4.tower-119.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 29 Jul 2011 17:49:29 -0000 Received: from enaf.sfdc.sbc.com (localhost.localdomain [127.0.0.1]) by mlpd194.enaf.sfdc.sbc.com (8.14.4/8.14.4) with ESMTP id p6THmFui027548; Fri, 29 Jul 2011 13:48:17 -0400 Received: from 01GAF5142010623.AD.BLS.COM (01GAF5142010623.ad.bls.com [139.76.131.87]) by mlpd194.enaf.sfdc.sbc.com (8.14.4/8.14.4) with SMTP id p6THmC1o027487; Fri, 29 Jul 2011 13:48:12 -0400 Received: from 01NC27689010626.AD.BLS.COM ([90.144.44.201]) by 01GAF5142010623.AD.BLS.COM with Microsoft SMTPSVC(6.0.3790.4675); Fri, 29 Jul 2011 13:48:51 -0400 Received: from 01NC27689010652.AD.BLS.COM ([90.144.44.141]) by 01NC27689010626.AD.BLS.COM with Microsoft SMTPSVC(6.0.3790.4675); Fri, 29 Jul 2011 13:48:50 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CC4E17.C63E31D2" Subject: Re: to_char() accepting invalid dates? Date: Fri, 29 Jul 2011 13:48:50 -0400 Message-ID: <377C0288D30BE04BA7B5FD60BDFC0C911A6F7040@crexc52p> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: to_char() accepting invalid dates? Thread-Index: AcxOF8ZUEhs/GHi2SVemL1NBk/efsg== From: "THOMPSON, JARED (ATTBAPCO)" To: Cc: X-OriginalArrivalTime: 29 Jul 2011 17:48:50.0756 (UTC) FILETIME=[C6734840:01CC4E17] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201108/7 X-Sequence-Number: 35675 This is a multi-part message in MIME format. ------_=_NextPart_001_01CC4E17.C63E31D2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable ERROR at line 1: ORA-01839: date not valid for month specified =20 =20 That error is coming on=20 select to_date('20110231', 'YYYYMMDD') from dual; =20 because there are not 31 days in February 2011, try this: =20 select to_date('20110228', 'YYYYMMDD') from dual; =20 Jared Thompson Internet Operations Group Office: 678.406.2895 jt060b@att.com =20 =20 =20 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. =20 ------_=_NextPart_001_01CC4E17.C63E31D2 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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<= o:p>

 

 

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.

 

------_=_NextPart_001_01CC4E17.C63E31D2--