Solved

SQL Criterion, What does it mean?

Posted on 2009-03-30
2
834 Views
Last Modified: 2012-05-06
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
Comment
Question by:mlcktmguy
2 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 125 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

by:Guy Hengel [angelIII / a3]
ID: 24021761
datetime is calculated like this:

1 = 1 day = 24 hours.

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

730 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