PEGA treats string as date - and subtracts a day
We are having trouble getting PEGA to handle dates in reports. We have a summary view that drills-down to a list view. Because we can only pass strings between these reports, the date field in the database view that PEGA is using for the summary view is defined as varchar. When we pass this to PEGA and group by it, PEGA treats this field as a date, not as a string, before we get to the listview (i.e. the problem lies in the summary view).
The property is defined in PEGA as text and on the database view as varchar. Nowhere is it mentioned as a date, yet PEGA treats it as a date. We know this because PEGA keeps subtracting a day from it. For example, we are grouping work items by the week in which they are received. We have a database view that has a column, defined as varchar, containing the date of the beginning of the week (so if the date received property was 13-APR-2011, a Wednesday, the column in the view would show 11-APR-11, a Monday). When this is displayed in the summary view it shows as 10-APR-11, that is, PEGA has subtracted one day from the date even though it is a string!
Does anyone know why this happens? And is there a way to stop it happening?
Many thanks for your help,
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Keep up to date on this post and subscribe to comments
- Hi All, How can i get Difference between two Dates. Example: i have (System Date- Old Date) = days. Can anyone help me on this. Thanks in Advance
- How to subtract days from a date
- addDays(String, int, boolean, String) is inconsistent. When 1 business day is added to the date I am getting the result as the same day as input
- Assigning a string value to a datetime property reduces the date by one day.
- Subtracting from Current date