It looks right to me. Just be careful about changing days. For example, if endtime = '1:30' (AM) and duration is 300 minutes, your start time would be 5 hours earlier, so, '8:30' (pm) of the previous day. This may not ever cause you problems (depending on your data), but it is something you should probably think about.
-George
Microsoft SQL Server MVP My Blogs SQLCop twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.