Can I use if statement to get datediff on field

M

Muna2009

I need to calculate datediff for the field (yes/no). If then statement did
not work please help me how to get result
 
D

Dirk Goldgar

Muna2009 said:
I need to calculate datediff for the field (yes/no). If then statement
did
not work please help me how to get result


Please explain in more detail. You can't get a DateDiff on a yes/no field,
so you must be referring to some other field or fields.
 
M

Muna2009

Muna2009 said:
I need to calculate datediff for the field (yes/no). If then statement did
not work please help me how to get result

I found the solution on Access website.

ABC_Days: IIf([ABC]=-1, AND DateDiff("d",[Start_Date],[Completed_Date]))
 
M

Muna2009

Muna2009 said:
Muna2009 said:
I need to calculate datediff for the field (yes/no). If then statement did
not work please help me how to get result

I found the solution on Access website.

ABC_Days: IIf([ABC]=-1, AND DateDiff("d",[Start_Date],[Completed_Date]))

There should not be AND the correct on is below

ABC_Days: IIf([ABC]=-1,DateDiff("d",[Start_Date],[Completed_Date]))
 

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