Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

How to calculate business days turntime between 2 timestamps - forum topic by dsldsl1980

$
0
0

I am trying to find an easier way to calculate turntime between 2 timestamps excluding holidays.  I know that it will require a cartesian join to a calendar table with holidays but the SQL is getting very lengthy and I would like to find a way to simplify it to fewer lines.  It is important to be accurate on what is excluded IE:
If a case is opened Sunday at 1:00 PM and closed Tuesday at noon it needs to do the following:
13 hours (sunday) + 24 hours (monday) + 12 hours (tuesday) - 13 hours (sunday).
or 24 hours (monday) + 12 hours (tuesday)

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>