if statements in SELECT

johnseito

Registered User.
Local time
Today, 00:52
Joined
Feb 27, 2013
Messages
89
with two or more conditions and have compare time.

For example,

IIf (
([max upload date]-[apt start date])>=1,"LATE"

) AS B,

but also add another logic to the first if

IIf (
([max upload date]=[apt start date]) and ([max upload time] >8:00pm) , "LATE"
) AS D

my second if is an error but how can I combined all of these logic into one?

This is in the select statement.

Thanks, appreciate it.
 
Gotta use delimiters on Dates (times too).

IIf (
([max upload date]=[apt start date]) and ([max upload time] >#8:00 pm#) , "LATE"
) AS D
 
Ok, thanks.

IIf ( ([max upload date]=[apt start date] and [max upload time] >#8:00 pm#) , "LATE") AS D


For some reason, I have an error with this, I don't know why?
 
You don't have something to display if the criteria isn't true.

IIf ( ([max upload date]=[apt start date] and [max upload time] >#8:00 pm#) , "LATE", "") AS D
 
Ok thanks boblarson.

you are an expert, compare to how many post you have to mine. ;-)
 

Users who are viewing this thread

Back
Top Bottom