Querying a Time value?

spinkung

Registered User.
Local time
Today, 17:57
Joined
Dec 4, 2006
Messages
267
Hi all,

I have a query that is supposed to get a time value from a field and enter a string into a new field based on the time it gets.

this is what i have. Its my VERY first query ever and so i'm not sure of the syntax. I doesnt work though so i'm assuming something must be wrong. Can anyone help?

Code:
iif((hour([request date])>12)and(minute([request date])>30)), "After 12:30", "Before 12:30"

Cheers,
Spinkung. :)
 
You don't need to compare the hours and minutes separately. I think this should do it.

Code:
IIf(Format([Request date], "HH:MM") > #12:30:00 PM#, "After 12:30", "Before 12:30")
 

Users who are viewing this thread

Back
Top Bottom