Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2013-06-24 : 11:34:10
|
Hi All,I have to calculate the datediffrence in hrs and based on some timing.Like Timing should be calculated between 9 Am - 04:30 PM EST from Monday to Friday |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-06-24 : 11:42:16
|
quote: Originally posted by sanjay5219 Hi All,I have to calculate the datediffrence in hrs and based on some timing.Like Timing should be calculated between 9 Am - 04:30 PM EST from Monday to Friday
Use a Calendar table and calculate the sum of hours between start date and time and end date and time. The calendar table will allow you to exclude Saturdays and Sundays. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|