Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Minneapolis, MN

    Unanswered: 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.

    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..."

  2. #2
    Join Date
    Feb 2004

    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

  3. #3
    Join Date
    Jan 2004
    Tallahassee, FL, USA
    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 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 record(s) selected.

    --Lekharaju Ennam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts