Skip to main content

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.

Support Article

Strategy automatically converts Date value to DateTime value



Pega Marketing 7.4 is installed on Pega 7.4.

A Strategy automatically converts a Date value to a DateTime value. On running a Campaign using this Strategy, the Date value persists to the BatchOut table as a truncated string with a plus symbol. This occurs post updating Pega 7.1.8 to Pega 7.4.

For example,

Consider a Strategy containing two Set Property components in Pega 7.4.

The first Set Property sets the value for a Date type property (For eg: DateProperty1 = '20190131').
The second Set Property component uses a function such as @weekday to which the Date type property (DateProperty1) is passed as input.

By default, the Strategy processes any Date value and converts it to DateTime. This Date value persists to the Batchout table as a truncated string appended with a plus symbol (that is, 2019013+).

In Pega 7.1.8, the Date value persists to the database correctly as a complete Date value without any plus character appended (for example, 20190131).

Error Messages

Not Applicable

Steps to Reproduce

  1. Create a simple Strategy containing components as Proposition Data > Set Property > Set Property > Results.
  2. Set the Date property value in the first Set Property Component (for example, DatePropert1 as "20190222").
  3. Use the Date property as an input to a function such as @weekday (for example, Set .pyLabel as @weekday(.DateProperty1)).
  4. Run a Campaign using this Strategy. The value persists for the Date value in the BatchOut table.

Root Cause

An issue in the custom application code or rules.
According to the design, while processing the Date value, the Strategy converts it to a DateTime value. In the Batchout table, a Varchar(8) column is created which is based on the Date property type. However, when the converted DateTime string is persisted to the Date column with Varchar(8), the value is truncated and saved with a plus symbol appended to the Date value.
It is recommended to use the DateTime property instead of the Date property.


Perform either of the following local-changes:
  • Map the Date property to a Strategy Result (SR) property to perform the calculations. Hence, the Date property does not change to DateTime and stays as a date.
  • Recreate the Date property as a DateTime property instead of a Date property.

Published April 6, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration 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 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