473,378 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2528
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: yawnmoth | last post by:
gmdate('F j, Y, g:i a',0) returns January 1, 1970, 12:00 am. How do I add to the second parameter of the date function to make it always return that same date, regardless of the time zone?...
2
by: Thomas Hermann | last post by:
A newbie question: With the config mentioned in the topic, all on localhost, Win xpsp2, i created a caledar-table. The output should be a daily calendar for half a year with about 15 cols. ...
2
by: Mo Ka | last post by:
Hi all, Is there a function (or other method) to automatically append the system date to the output tablename of a make table query such that the new one does not overwrite an older table?. I...
11
by: Lyle Fairfield | last post by:
The stored procedure script below is an example of how looping, case statements and output parameters can be used in MS-SQL stored procedures to accomplish things for which we may have had to use...
4
by: Michael Maes | last post by:
Hello, I want to add a date (ShortDateString) to a custom template-file (Class). I use: a.. b.. c.. But I can't find anythig on a date (something like: )
3
by: pmarisole | last post by:
The following javascript code gives me the date validation that I need except after the correct date is entered into the field, it puts the date in the wrong format EXAMPLE: User enters...
13
by: Filips Benoit | last post by:
Dear All, How can I show the resultrecords of a SP. I can be done by doubleclick the SPname? But how to do it by code. I want the following interface In my form the user 1 selects a SP...
0
Savage
by: Savage | last post by:
I'm making for fun a simple program which format a input file.Input file sustain of person name,lastname and date of birth.Output file si supposed to be forammted as following: NAME ...
3
by: xxtokenxx | last post by:
I am writing a birthday list for a site for my school. While developing it. Currently the code for the output of birthdays is: <html><head> <title>Birthday List</title><script...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.