Update Query with Time Criteria

H

hotplate

Hi,

I need help with an update query. I would like to update the shift to
either 1 or 2 depending on the time of day. The time field is in the
Date/Time formate so it would look like "2/5/2008 9:45:32 AM". I need
to update the shift to 1 if it is between 5AM and 5PM, and 2 if it is
between 5PM and 5AM.

Can someone help me with this query? Thanks in advance.

Garrett
 
F

fredg

Hi,

I need help with an update query. I would like to update the shift to
either 1 or 2 depending on the time of day. The time field is in the
Date/Time formate so it would look like "2/5/2008 9:45:32 AM". I need
to update the shift to 1 if it is between 5AM and 5PM, and 2 if it is
between 5PM and 5AM.

Can someone help me with this query? Thanks in advance.

Garrett

In VBA help, look up the TimeValue function. Check the example.
 
Top