Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44772 invoked from network); 29 Apr 2005 00:44:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Apr 2005 00:44:20 -0000 Received: (qmail 89795 invoked by uid 500); 29 Apr 2005 00:45:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 89721 invoked by uid 500); 29 Apr 2005 00:45:26 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 89629 invoked by uid 99); 29 Apr 2005 00:45:25 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 28 Apr 2005 17:45:25 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 30E062CD for ; Fri, 29 Apr 2005 02:44:10 +0200 (CEST) Message-ID: <137688436.1114735450198.JavaMail.jira@ajax.apache.org> Date: Fri, 29 Apr 2005 02:44:10 +0200 (CEST) From: "Satheesh Bandaram (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-161) DATE function as documented in the manuals does not support integer arguments. i.e. DATE(1232) does not work although the manual specifies that this format will return a date field that is "x" number of days since day 0. In-Reply-To: <600989740.1109965486835.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-161?page=all ] Satheesh Bandaram closed DERBY-161: ----------------------------------- Fix checkedin. > DATE function as documented in the manuals does not support integer arguments. i.e. DATE(1232) does not work although the manual specifies that this format will return a date field that is "x" number of days since day 0. > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-161 > URL: http://issues.apache.org/jira/browse/DERBY-161 > Project: Derby > Type: Bug > Components: SQL > Versions: 10.0.2.0 > Environment: Windows XP Professional SP 1 > Reporter: George Baklarz > Priority: Minor > Fix For: 10.1.0.0 > > The DATE function returns a date from a value. The argument must be a date, timestamp, a positive number less than or equal to 3,652,059, a valid string representation of a date or timestamp, or a string of length 7 that is not a CLOB or LONG VARCHAR. If the argument is a string of length 7, it must represent a valid date in the form yyyynnn, where yyyy are digits denoting a year, and nnn are digits between 001 and 366, denoting a day of that year. The result of the function is a date. If the argument can be null, the result can be null; if the argument is null, the result is the null value. The other rules depend on the data type of the argument specified: > - If the argument is a date, timestamp, or valid string representation of a date or timestamp: The result is the date part of the value. > - If the argument is a number: The result is the date that is n-1 days after January 1, 0001, where n is the integral part of the number. > - If the argument is a string with a length of 7: The result is the date represented > The DATE function does not support integer argument. > ij> values date(12345); > ERROR 42846: Cannot convert types 'INTEGER' to 'DATE'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira