View previous topic :: View next topic
|
Author |
Message |
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
Hi ,
One of my requirement is to extract a column which is of data type Date and to compare it with the current date to find the difference in Days , Like for example if the column value is 01.06.2008 and the current date is 02.06.2008 the difference should be one , is there any way that this can be achieved by quering SYSIBM.SYSDUMMY1?
Thamilzan. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Have you tried searching or looking in the manual?
days(current date) - days(date2)
results will be an integer (s9(9) comp).
Code: |
exec sql
set :results = days(current date) - days(date2)
end exec.
You can extract the date column and do the calculation all in one sql statement. |
|
|
Back to top |
|
|
|