Skip to main content

Support Article

Default PEGA date 1970-01-01 saved to DB

SA-7194

Summary



Default date 1970-01-01 is saved to DB where we want to have null if it is not entered.

During Obj-Save operation property value is NULL, but when it is inserted in DB it becomes 19700101.

DB column type is varchar2 and property type is Date.

How we can achiewe that default pega date would not be set?



Resolution



It is a expected behavior to convert null values to 1970-01-01.

https://pdn.pega.com/sites/default/files/help_v62/procomhelpmain.htm#concepts/concepts2/conceptsdatetime.htm

"A property of type Date can have a null value. For example, if you use the Property-Set method to set a Date type value from a Text value that is null, the result is null. However, the Java Date operations convert an integer value of 0 to the date 19700101 (January 1, 1970). This Date value may result when Process Commander evaluates expressions that internally use the Java Date operations"

Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful?

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.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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