You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by TomohitoNakayama <to...@basil.ocn.ne.jp> on 2007/02/11 07:12:27 UTC

Question around DAY function in Derby Reference manual

Hello.

Through translation of Derby Reference manual, I found question around
description of DAY function.
http://db.apache.org/derby/docs/dev/ref/rrefdayfunc.html

The manual told as next :
The argument must be a date, timestamp, or a valid character string
representation of a date or timestamp that is not a CLOB, LONG VARCHAR,
or XML value.

The description above told that argument is limited to date, timestamp,
character string which represents date or timestamp.

However, next description exists in the same page :
If the argument is a time duration or timestamp duration: The result is
the day part of the value, which is an integer between -99 and 99. A
nonzero result has the same sign as the argument.

The second description refers that duration which can be argument of the
DAY function.

Question is, can the argument of DAY function be duration ?
If it can, how is duration passed to DAY function ?

Best regards.

-- 
/*

        Tomohito Nakayama
        tomonaka@basil.ocn.ne.jp
        tomohito@rose.zero.ad.jp
        tmnk@apache.org

        Naka
        http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/ 


Re: Question around DAY function in Derby Reference manual

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.

If there are no problem, I want to commit the patch at
http://issues.apache.org/jira/browse/DERBY-908

I will wait for days.

Best regards.

Daniel John Debrunner wrote:

>TomohitoNakayama wrote:
>
>  
>
>>However, next description exists in the same page :
>>If the argument is a time duration or timestamp duration: The result is
>>the day part of the value, which is an integer between -99 and 99. A
>>nonzero result has the same sign as the argument.
>>
>>The second description refers that duration which can be argument of the
>>DAY function.
>>
>>Question is, can the argument of DAY function be duration ?
>>If it can, how is duration passed to DAY function ?
>>    
>>
>
>See DERBY-908
>
>http://issues.apache.org/jira/browse/DERBY-908
>
>Dan.
>
>
>
>  
>

-- 
/*

        Tomohito Nakayama
        tomonaka@basil.ocn.ne.jp
        tomohito@rose.zero.ad.jp
        tmnk@apache.org

        Naka
        http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/ 


Re: Question around DAY function in Derby Reference manual

Posted by Daniel John Debrunner <dj...@apache.org>.
TomohitoNakayama wrote:

> However, next description exists in the same page :
> If the argument is a time duration or timestamp duration: The result is
> the day part of the value, which is an integer between -99 and 99. A
> nonzero result has the same sign as the argument.
> 
> The second description refers that duration which can be argument of the
> DAY function.
> 
> Question is, can the argument of DAY function be duration ?
> If it can, how is duration passed to DAY function ?

See DERBY-908

http://issues.apache.org/jira/browse/DERBY-908

Dan.