Solved

SQL Criterion, What does it mean?

Posted on 2009-03-30
2
821 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 142

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

770 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