Solved

What is time_offset in MSSQL?

Posted on 2010-11-22
3
394 Views
Last Modified: 2012-06-27
Hi, I'm trying to decipher some code that selects tasks based on their time, or so it says... Here's the filter:

datepart(hh,@NOW)*60 + datepart(mi,@NOW) + time_offset*60 BETWEEN 480 and 1170)

A comment next to it says it will select tasks between 8:00 am and 7:30 pm. Is this correct? How does this work?
0
Comment
Question by:horalia
  • 2
3 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34193279
[b]time_offset[/b] is a column in some table that is part of that select...

It is most likely an integer value (number) that represents how many minutes to shift the range 8:00 to 17:30 by.
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 500 total points
ID: 34193281
[b]time_offset[/b] is a column in some table that is part of that select...

It is the number of hours by which to shift the range 8:00 to [b]19[/b]:30 by. So if it is 1.5, the range becomes 9:30am - 9pm
0
 

Author Closing Comment

by:horalia
ID: 34193367
Don't even know the tables I'm working with... thought it was some type of function! Thanks!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now