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 > Anyone know of a 'holiday library' in db2?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-10-10, 15:09
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
Anyone know of a 'holiday library' in db2?

Hi,

I was wondering if there's any DB2 library out there that can be used to check if the current day is a certain holiday? For example, a stored procedure / program will get a list of holidays to check for from a db table.. and return true as soon as the current day matches one of the holidays. If it gets to the end of the list and the current day is not a holiday, then it returns false. Also, Thanksgiving will be read as the 4th thurs in Nov... and needs to be read like this in the library. Someone recommended using this java library --

http://www.javaworld.com/javaworld/j.../Holidays.java

Do any of you have any experience working with holidays in DB2? How would you implement this?

Thanks!!
Reply With Quote
  #2 (permalink)  
Old 05-11-10, 01:43
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by db2user24 View Post
How would you implement this?Thanks!!
Just implement that piece of java-code as a stored-procedure and/or function. See Solve common problems with DB2 UDB Java stored procedures
Reply With Quote
  #3 (permalink)  
Old 05-11-10, 08:24
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
Another solution that has been implemented in many locations I have been is your own calendar table. This was done, because there are so many holidays and not all companies celebrate them all.
Dave
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