Support Article

Day of function in Report Definition returns wrong day

SA-31245

Summary



Using the 'Day of' function on pyResolvedTimestamp returns wrong day in Report Definition


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a Report Definition to report on resolved work items.
  2. In the Report Definition configure a column as Day of(.pyResolvedTimestamp).
  3. Resolve a work item such that its timestamp would fall in today as per server's local time and when converted to GMT it would fall in next day.
  4. Run the report and see that Day of(.pyResolvedTimestamp) returns next day while the item was resolved today.


Root Cause



Pega 7 stores the timestamp in GMT time in the blob. When a column is exposed the timestamp is stored in the local time of the server. If the data is read via an Obj-browse or Obj-open, the Engine does the proper conversion from GMT to local time. However in the ‘Day of’ function alias used in a Report Definition, it uses the timestamp stored in the local time of the server and may return an unexpected result.

Resolution



Perform the following local-change:

Create a function alias using the pxDay function alias and handle the conversion.

 

Published December 9, 2016 - Updated December 13, 2016


100% found this useful

Have a question? Get answers now.

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