Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

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.

DateTime property mapping in Oracle for Pega 7

Updated on October 3, 2017

DateTime properties in Pega 7 can be mapped to both DATE and TIMESTAMP columns in an Oracle database. Report definitions, List Views, and Summary Views all support these column types.

Obj-Save, Obj-Browse, and other save-related APIs (other than RDB-Save) consider the milliseconds part of the DateTime value during save and retrieval. RDB-Save is accurate to the second.

Recommended use

Both column types display similar numerical data for DateTime properties when viewed in the Report Definition. However, it is recommended that you use TIMESTAMP columns whenever possible because of the increased precision provided by millisecond data that DATE columns do not provide.

The following example shows the clipboard result page that is included in the report for a TIMESTAMP column:

datetime-mapped-to-timestamp-column.png

Upgrading from previous releases

When you upgrade from a Pega 7 version that is earlier than Pega 7.1.8, any existing DateTime properties continue to map to the DATE column. These can be manuallychanged to map instead to TIMESTAMP columns, and are maintained as TIMESTAMP columns for any upgrades to future releases of Pega 7.

If you perform this conversion process from DATE to TIMESTAMP columns, before you can downgrade to an earlier version of Pega 7, you must manually switch the column type back to DATE.

Any new DateTime properties created post-upgrade by using the following criteria are mapped to TIMESTAMP columns:

  • Optimizing a DateTime property for reporting
  • Exposing a column from the "Modify schema" landing page
  • Creating a new class with a dedicated table
  • Importing a RAP with a TIMESTAMP column

Converting an existing column

To convert an existing DATE column to TIMESTAMP, the ALTER script has to be executed on the database manually. Data is unaffected by the conversion.

Connect to the Pega 7 database and run the following ALTER script and update the Schema_Name, Table_Name, and Column_Name values, which are highlighted below.

ALTER TABLE <Schema_Name>.<Table_Name> MODIFY <Column_Name> TIMESTAMP

For example, pc_History_Work is an internal table with the column pxTimeCreated of the type DATE. To convert the pxTimeCreated column to instead use TIMESTAMP for the column, run the following script:

ALTER TABLE <Schema_Name>.pc_History_Work MODIFY pxTimeCreated TIMESTAMP

Additional resources

Oracle knowledgebase article – oracle.sql Class TIMESTAMP

  • Previous topic Platform Bulletin: Oracle database issues
  • Next topic Make your application's Oracle database ready for internationalization

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us