469,362 Members | 2,441 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

output of DATE function

Hi,
I am using DB v8.2. when I issuing the following stmt.:
"select DATE('25.12.2006')-DATE('24.12.2006')from sysibm.sysdummy1" :
1
"select DATE('25.12.2006')-DATE('24.11.2006')from sysibm.sysdummy1" :
101
"select DATE('25.12.2006')-DATE('25.12.2005')from sysibm.sysdummy1" :
10000
"select DATE('25.12.2006')-DATE('01.12.2005')from sysibm.sysdummy1" :
10024

can anyone please explain the reason for this sort of output.

thanks in advance.......
satish

Nov 21 '06 #1
3 2417
In article <11*********************@e3g2000cwe.googlegroups.c om>,
sa***************@gmail.com says...
Hi,
I am using DB v8.2. when I issuing the following stmt.:
"select DATE('25.12.2006')-DATE('24.12.2006')from sysibm.sysdummy1" :
1
"select DATE('25.12.2006')-DATE('24.11.2006')from sysibm.sysdummy1" :
101
"select DATE('25.12.2006')-DATE('25.12.2005')from sysibm.sysdummy1" :
10000
"select DATE('25.12.2006')-DATE('01.12.2005')from sysibm.sysdummy1" :
10024

can anyone please explain the reason for this sort of output.

thanks in advance.......
satish

That's a date duration, check the docs at http://tinyurl.com/tt6sc for
'labeled durations'.
Nov 21 '06 #2
satish mullapudi wrote:
Hi,
I am using DB v8.2. when I issuing the following stmt.:
"select DATE('25.12.2006')-DATE('24.12.2006')from sysibm.sysdummy1" :
1
The interval is 00000001, i.e. 1 day.
"select DATE('25.12.2006')-DATE('24.11.2006')from sysibm.sysdummy1" :
101
The interval is 1 month and 1 day.
"select DATE('25.12.2006')-DATE('25.12.2005')from sysibm.sysdummy1" :
10000
The interval is 1 year, 0 months (digts 2-3), and 0 days (last 2 digits).
"select DATE('25.12.2006')-DATE('01.12.2005')from sysibm.sysdummy1" :
10024
The interval is 1 year, 0 months, and 24 days.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 21 '06 #3
thanq....

Knut Stolze wrote:
satish mullapudi wrote:
Hi,
I am using DB v8.2. when I issuing the following stmt.:
"select DATE('25.12.2006')-DATE('24.12.2006')from sysibm.sysdummy1" :
1

The interval is 00000001, i.e. 1 day.
"select DATE('25.12.2006')-DATE('24.11.2006')from sysibm.sysdummy1" :
101

The interval is 1 month and 1 day.
"select DATE('25.12.2006')-DATE('25.12.2005')from sysibm.sysdummy1" :
10000

The interval is 1 year, 0 months (digts 2-3), and 0 days (last 2 digits).
"select DATE('25.12.2006')-DATE('01.12.2005')from sysibm.sysdummy1" :
10024

The interval is 1 year, 0 months, and 24 days.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by yawnmoth | last post: by
2 posts views Thread by Thomas Hermann | last post: by
4 posts views Thread by Michael Maes | last post: by
Savage
reply views Thread by Savage | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.