x
Solved

# SQL Criterion, What does it mean?

Posted on 2009-03-30
Medium Priority
865 Views
The following criterion is used in a query from an application that I have inherited.  It is on a table field 'CollTime' that is specified as Date/Time with no other format.  The contents of the field look like '2:50:00 PM', '11:45:00 AM' etc..

>=([CollectTime]-0.010416667) And <=([CollectTime]+0.010416667)
0
Question by:mlcktmguy

LVL 93

Accepted Solution

Patrick Matthews earned 500 total points
ID: 24021695
0.010416667 works out to ~900 seconds, or 15 minutes.

There are 86,400 seconds in one day, 0.010416667 * 86400 = 900

So it seems that one time is being checked to see if it is +/1 15 minutes from another time.
0

LVL 143

Expert Comment

ID: 24021761
datetime is calculated like this:

1 = 1 day = 24 hours.

so, 0.01041667 +- 0.25 hours = 15 minutes.
0

## Featured Post

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.