Project and Portfolio Management Practitioners Forum
cancel

Trying to calculate days between 2 dates with an advanced rule (error)

SOLVED
Go to solution
Highlighted
mvillalobos
Super Contributor.

Trying to calculate days between 2 dates with an advanced rule (error)

Hello

I am trying to calculate the days between 2 dates into an advanced rule in PPM but it fails always.

I do it with a normal SQL statement and it works propertly.

the statement for the SQL: (tora.jpg)
SELECT TO_DATE(PARAMETER19) - TO_DATE(PARAMETER18), TO_DATE(PARAMETER19) - TO_DATE(PARAMETER18) FROM PPMUSER.KCRT_REQ_HEADER_DETAILS WHERE REQUEST_ID = 31236;

In the folder.rar:
The Rule is on -> Rule.jpg
The error is on -> error.jpg
The sql statement succesfull -> Tora.jpg
The content of parameters -> Parameters.jpg

Thank you very much
4 REPLIES
Victoria Warndo
Valued Contributor.
Solution

Re: Trying to calculate days between 2 dates with an advanced rule (error)

I posted a similar question on 5/4/11. It was successfully answered. Please see my post "How to calculate the duration between two dates using rules". It may be helpful.
Edtroleis
Super Contributor.

Re: Trying to calculate days between 2 dates with an advanced rule (error)

Hello, try this.

SELECT
TO_DATE(PARAMETER19, 'YYYY-MM-DD HH24:MI:SS') - TO_DATE(PARAMETER18, 'YYYY-MM-DD HH24:MI:SS'), TO_DATE(PARAMETER19, 'YYYY-MM-DD HH24:MI:SS') - TO_DATE(PARAMETER18, 'YYYY-MM-DD HH24:MI:SS') FROM PPMUSER.KCRT_REQ_HEADER_DETAILS
WHERE REQUEST_ID = 31236

Best regards.
mvillalobos
Super Contributor.

Re: Trying to calculate days between 2 dates with an advanced rule (error)

Thank you very much, it works properly.

And sorry not to find the older answer.
mvillalobos
Super Contributor.

Re: Trying to calculate days between 2 dates with an advanced rule (error)

It works properly