Can I use if statement to get datediff on field

  • Thread starter Thread starter Muna2009
  • Start date Start date
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
 
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.
 
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]))
 
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]))
 
Back
Top