Access query date/time returns inappropriate records -


i have interesting problem have been unable find answer for! writing queries @ data based on times of 2 different events, difference in arrival of 2 units location. straightforward.

data , part two see below 'part two' clarification.

[elapsed_time] calculated difference between 2 , date/time.

the first query used @ occurrences difference less 30 seconds.

qry = "insert [table] select * [new data] ([1st_agency_onscene] = 'abcd') , ([elapsed_time] < #12:00:30 am#);" docmd.runsql qry 

when query run should return 279 rows instead returns 281, 2 extra. looking @ 2 rows following returned:

refer 'part two' in previous image (i may have 2 links!).

they both @ 30 seconds should not returned. there other records have time of 30 seconds not returned, (6 others, 8 total).

i not sure how/why stored differently others 30 seconds. in attempt find difference created field subtracted [2nd_agency_onscene_time] first , appears somehow stored differently. see 2 highlighted records.

perhaps significant

what making data returned though should not be? in addition every date range has few similar occurrences.

i appreciate thoughts , assistance.

this happens because comparing doubles underlying data type of date.

so, use example native functions replace ([elapsed_time] < #12:00:30 am#)

(datediff('s', [elapsed_time], #12:00:30 am#) > 0) 

Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -