Posted In: Java Script

JS: Finding Number Of Working Days between 2 dates

Leave tracking application often required to calculate number of days between the range of leave dates. To calucalte the actual leave days we exclude weekends and any holidays comming between the date range. Following code take care of both weekends and Public Holidays — <script> var monthNames = {jan:0,feb:1,mar:2,apr:3,may:4,jun:5, jul:6,aug:7,sep:8,oct:9,nov:10,dec:11}; // List of Holiday (Exclude […]

Read More


by , on January 3rd, 2019

Posted In: DB2, Java Core, JDBC

DB2: Java Inserting data using stored procedure

Accesing and executing DB2 stored procedure using Java JDBC Inserting data into sample COUNTRY table: Table Schema: COUNTRY_CODE VARCHAR(20) COUNTRY_NAME VARCHAR(30) Crating a db2 stored procedure Java Code 

Read More

by , on April 20th, 2018

Posted In: Database, JDBC

DB2 : Java Accessing the resultset returned from Stored Procedure

Taking sample example of Countries, we will return the list of countries from stored procedure matching the required criteria Creating Table   Inserting Sample Values:   Writing Stored Procedure:  Instead of fetching rows in a loop by the fetch statement, you can return a complete result  set to the calling client program. the stored procedure […]

Read More

by , on April 19th, 2018

  • Categories