Formula to calculate Today - PORel.DueDate in a BAQ

I am working with version 9.05 and I can’t seem to figure out how to use the “Today” constant in a formula.

I’m trying to see when there are less than 10 days from today to get a Subcontract PO back in.

I thought it would be: Today - PORel.DueDate but that returns a syntax error. I’m sure it’s something simple. I can subtract to database date fields no problem. I’ve tried converting “Today” into a different format, but I’m a rookie on formulas.

Thanks in advance,
John Gillenwater

10 days from today : dateadd(day, -10,Constants.Today )
And Today - PORel.DueDate = datediff(day,Constants.Today,PORel.DueDate)

Hello Joe,
Thanks for getting back with me. I’m still getting a syntax error using your formula: Today - PORel.DueDate = “datediff(day,Constants.Today,PORel.DueDate)”

I think that works in SQL, but I’m trying to do it within the Calculated field function of the BAQ and the Datediff command doesn’t appear to be supported in 9.05 Progress, unless I’m doing something wrong.

Thanks,
John Gillenwater

I sometimes will break these up into separate calculated fields
From your description I wasn’t sure exactly what values you were looking for but… here are a few simple examples for E9.05 - Progress.

DatePlus10 as DATE:… Today + 10
DuePlus10 as DATE:… PORel.DueDate + 10
DateDiff01 as INTEGER:… DatePlus10 - DuePlus10

DateDiff02 as INTEGER:…(Today + 10) - (PORel.DueDate + 10)
DateDiff03 as DATE:… Today + (Today - PORel.DueDate)

Thank you Bruce, that worked! Thank you everyone for helping out.

John Gillenwater