if statement with date

S

samuel

i have a date/time field "EnterDateTime" 11/2/2005 3:38:00 AM

i'm wanting to use the expression

Shift:
IIf([EnterDateTime]>7,IIf([EnterDateTime]>15,IIf([EnterDateTime]>23,"Night","Evening"),"Day"),"Night")

i need to extract on the hour "3"

how do i put this into my IIf statement?
 
J

John Spencer

IIf(Hour([EnterDateTime])>7,IIf(Hour([EnterDateTime])>15,IIf(Hour([EnterDateTime])>23,"Night","Evening"),"Day"),"Night")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top