If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Business Days and Holidays

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-21-04, 13:53
ansonee ansonee is offline
Registered User
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 253
Business Days and Holidays

Is anyone aware of a function (system or user defined) that will calculate business days? For instance: I have a column in as table called DATE. I want to be able to add five business days to that date and come up with a new date. Is that possible.

Also, is there anyway that DB2 can be aware of holidays? Maybe load them onto the server in some type of reference file or something.

I ask these questions because I'm working on a banking application and these are two MAJOR hurdles for us to get over.

Any help would be appreciated.

Thanks!
__________________
Anthony Robinson

"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."
Reply With Quote
  #2 (permalink)  
Old 03-11-04, 17:45
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Re: Business Days and Holidays

Try creating a table with all workdays
and corresponding dates for your country,
and add a sequential id number

Then you can select the idnumber and the
date corresponding to the selected id +5

Its a workaround but I hope it helps :-)
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #3 (permalink)  
Old 03-12-04, 04:44
famudba famudba is offline
Registered User
 
Join Date: Jan 2004
Location: Tallahassee, FL, USA
Posts: 96
to substract days from date & get get date formate is as below :-


this will returns julian day
select days(current date) from sysibm.sysdummy1

1
-----------
731652

1 record(s) selected.


this is adding 3 days to current (03/12/2004 ) getting 03/15/2004, in stead of current date , put your columns , you will get it

select date(days(current date) +3 ) from sysibm.sysdummy1

1
----------
03/15/2004

1 record(s) selected.


--Lekharaju Ennam
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On