View previous topic :: View next topic
|
Author |
Message |
abcd.us786
New User
Joined: 06 Dec 2006 Posts: 5 Location: India
|
|
|
|
hello!
i put the query
SELECT DAYS(CURRENT DATE) FROM SYSIBM.SYSDUMMY1;
the result was 732679.
if anyone can tell me what that number specifies? |
|
Back to top |
|
|
santosh_dorge
New User
Joined: 03 Dec 2006 Posts: 8 Location: Mumbai
|
|
|
|
HI,
This query would give you the total number of days
since 01/01/0001 upto the current date. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
HI there,
Just to add one more point if u give
Code: |
SELECT DAY(CURRENT_DATE)
FROM SYSIBM.SYSDUMMY1; |
the result will be the day part of the value, which is an integer between 1 and 31. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Santosh,
Just one correction in ur post
Its from FM
Quote: |
The result is 1 more than the number of days from January 1, 0001 to D, where D is the date that would occur if the DATE function were applied to the argument |
|
|
Back to top |
|
|
santosh_dorge
New User
Joined: 03 Dec 2006 Posts: 8 Location: Mumbai
|
|
|
|
guptae wrote: |
Hi Santosh,
Just one correction in ur post
Its from FM
Quote: |
The result is 1 more than the number of days from January 1, 0001 to D, where D is the date that would occur if the DATE function were applied to the argument |
|
Thanks for correction Guptae |
|
Back to top |
|
|
santosh_dorge
New User
Joined: 03 Dec 2006 Posts: 8 Location: Mumbai
|
|
|
|
guptae wrote: |
Hi Santosh,
Just one correction in ur post
Its from FM
Quote: |
The result is 1 more than the number of days from January 1, 0001 to D, where D is the date that would occur if the DATE function were applied to the argument |
|
Thanks for correction Guptae |
|
Back to top |
|
|
|