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

pxDay function displays incorrect value for DateTime property

SA-54547

Summary



pxDay function displays the incorrect value for the DateTime property.


Error Messages



Not Applicable


Steps to Reproduce

  1. Ensure that the operator time zone and Database or Application server time zone are different (for example: Operator time zone is America or New_York and Database or Application Server time zone is IST).
  2. Create a DateTime property.
  3. Expose the property.
  4. Create a work object and fill the DateTime property value as 28th March 10:00 PM.
  5. Create a report definition rule.
  6. Use the pxDay function to retrieve the date portion from the DateTime property.


Root Cause



This behavior is as per Pega product design.

pxDay rule is of Rule-Alias-Functions type. This works on database or AppServer time zone only. It does not convert the DateTime value from the database time zone to operator time zone. 

On entering 28th March 10:00 PM for the DateTime property, the application converts it to database time zone and stores it in the corresponding exposed columns. In this case, value is now 1st April.

When pxDay function is used to retrieve the date portion from the DateTime property, 1st April is returned instead of 31st March as it does not convert to the operator time zone.



Resolution



As a local-change, write a custom Rule-Alias-Function to convert the DateTime value according to the operator time zone.


 

Published August 24, 2018 - 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?

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