logical test If() not working; data type for the return problem?
I'm doing a logical test off a string type column for inserting a column. If it is true, I want it to return the number of days as shown below. If not, i want the string "HBP to be returned.
Is there a convention I have to use to make this work? I tried the If() simply using strings with no errors. The same with the DateDiff(). Combining them is the problem, which leads me to believe it's a data type error. Below is the code.
If([hbp]="N", DateDiff([exp],DateTimeNow()), "HBP")