Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

DateTimeDifference function "h" precision doesn't return decimal

SA-3523

Summary



When you use the DateTimeDifference function with a specified precision, you notice the return value doesn't contain the decimal part associated the time difference.

Error Messages



None


Steps to Reproduce

  1. Create an activity
  2. Add a Property-Set step which assigns "@(Pega-RULES:DateTime).DateTimeDifference("20141112T193000.000 GMT", "20141112T200000.000 GMT", "h")" to a double property.
  3. Review the results

Root Cause



The root cause of this problem is a defect in customer application code/rules. The expected behavior of DateTimeDifference is to return only the whole number value of the difference over the precision.


Resolution



This issue is resolved through the following local change:

Create a custom rule-utility-function that doesn't call the floor function to remove the decimal component of the return. For assistance with this, contact GCS.

 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us