Highlighted
Absent Member.. Absent Member..
Absent Member..
229 views

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

Jump to solution
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
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.
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.

View solution in original post

0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.
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.

View solution in original post

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
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.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
Thank you very much, it works properly.

And sorry not to find the older answer.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
It works properly
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.