DateDiff function in calculated BAQ field

Hello all,

I am trying to create a calculated field that calculates the days between today ( a constant) and the due date on a PO. I have used the Datediff function successfully before, but I am now having syntax issues. Can anyone help me fix this expression? I see plenty of posts on this particular problem but I still can’t identify where my syntax breaks down.

I’ve also tried with a conversion:

Thanks so much,
Alice

Take a look at the format returned by the PODetail.DueDate value. It might not be what the DATEDIFF function requires.

Just for fun (or troubleshooting), replace the PODetail.DueDate with ‘03/31/2018’ (including the single quotes), and see if you still get an error. If not, replace the Constants.Today with today’s date. I’ll bet one of those is what’s causing it to choke.

Thank you Ernie. I tried replacing each of the 2 fields with actual dates and get the same error. I am puzzled. Here are my 3 attempts:

Change the Field Name to something else. I don’t think it likes DateDiff (maybe because it is a reserved word).

Karen

2 Likes

That was indeed the problem. You are awesome. Thank you so much.