Solved

SQL Criterion, What does it mean?

Posted on 2009-03-30
2
803 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
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
datetime is calculated like this:

1 = 1 day = 24 hours.

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

744 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

10 Experts available now in Live!

Get 1:1 Help Now