Comparing dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I need to pull up some data by shift. How can I determine what shift ran
what?

I have a date/time field (combined) in a table that I am unable to do
anything too (linked and not our database).

Could I create another table with 3 fields: [Shift], [Start Date/Time], [End
Date/Time] and use that to compare the date from the other table?

Thanks all in advance!
 
There are two useful functions - DateAdd and DateDiff, hope one of it will
help to solve your problem, look in access help
 
Yes you could. Or you could just hard code it in your SQL...

The following SQL will select all data stamped
with a date/time stamp between
8:00am and 5:00pm

Note this function DatePart is using Military Time:

"SELECT tableName.* " & _
"FROM tableName " & _
"WHERE ((((DatePart("h",[dateFieldName])>=8) " & _
"And (DatePart("h",[dateFieldName])<=16))));"

If you need more assistance please do not hesitate to ask!
Take Care & God Bless ~ SPARKER ~
 
Back
Top