In Dataset rule, below you will find Date time Format and Date format and Time Of Day format fields.Check whether the format in Date format field same as CSV file date column format.
For CSV and JSON files, update date and time settings:
In the Date Time format field, enter the pattern representing date and time stamps in the selected file.
The default pattern is: yyyy-MM-dd**HH:mm:ss
In the Date format field, enter the pattern representing date stamps in the selected file.
The default pattern is: yyyy-MM-dd
In the Time Of Day format field, enter the pattern representing time stamps in the selected file.
The default pattern is: HH:mm:ss
In your Data Flow, ensure that the Date Format specified for the CSV file matches the actual format of the date column.
You can find this setting in the Data Set configuration.
If your CSV file has dates in “mm/dd/yyyy” format, set the Date Format accordingly.
Create a data transform to convert the CSV date value to the desired format for your Date property.
Use the @DateTime.FormatDateTime function to transform the date value.
@DateTime.FormatDateTime(@DateTime.CurrentDateTime(), “MM/dd/yyyy”, pxRequestor.pyDefaultTimeZone)
This function converts the current date to the “mm/dd/yyyy” format.
In the Mapping Tab, ensure that the Date Property is correctly mapped to the transformed date value.
Verify that the database columns have the correct data types. Pega may not support certain column types.
If you encounter issues with date-related columns, consider altering the column type to TIMESTAMP.
For dates, Pega typically uses data types like DateTime, Date, or Time. Ensure that the Pega property corresponds correctly to the database column type.
Sometimes, JDBC drivers might not fully support certain data types or their mappings. Ensure that you are using a JDBC driver version that is compatible with the data types in your database. Updating or changing the JDBC driver version might resolve compatibility issues.
For PostgresSQL, date property in pega can only support DB column as varchar(8)
and even if we want to use Date column as ‘Date’, we need to pass as yyyy-MM-dd, where as Date property in pega supports or holds yyyyMMdd.
I tried saving a text property value as yyyy-MM-dd value to a ‘Date’ property but it is not changing (keeping as yyyymmdd only). Also tried datetimeformat function but no help.