Support Article
Pega Default Date Value is stored as 01011970 in database
SA-53038
Summary
When setting the Date property as blank, the Date value is stored as '01011970' in the database.
Error Messages
Not Applicable
Steps to Reproduce
- Add a repeat grid sourced with an editable datapage containing a Date property as a column whose value changes dynamically using a declare expression depending on a boolean property.
- Perform a filter on the date property.
Root Cause
An issue in the custom application code or rules.
Resolution
Perform the following local-change:
Alter the declare expression to set the Date to avoid the below condition in a single statement as displayed in the below image.
For example, condition: .NRFI = true ? @getCurrentDateStamp(): ""
Instead, use the 'Whenever used (if - otherwise)' step in the declare expression and set the value as blank as displayed below to avoid '01011970' in the database.
Additionally, create and use the following Dynamic System Setting (DSS) related to the default date.
Pega-IntegrationEngine. disableEpochDateTime | When a DateTime property is set to an empty value, it returns the epoch DateTime (01-jan-1970) by default. Set this value to "true" to have the property return no value. |
Published September 19, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.