Wednesday, January 29, 2014

Oracle Date Function: Adding Days to a Date and skipping Saturday and Sunday

I had to write a query to find demand between system date and system date + lead time. Lead time did not include Saturday and Sunday. So i was looking for an Oracle function to do that but i could not find one. I did not want to write a custom function for that. So i thought, it should possible to write sql to exclude Saturday and Sunday from date calculation. It turned out to be very easy. The following sql can used to determine end date that excludes Saturdays and Sundays



No comments:

Post a Comment