Different dates formats in xls and datamapper

Hello everyone,

I am wondering if someone could help me with date. I have one issue with formatting the date. In my .xls file date is in format 16.06.2020 language Sr but in data mapper it is 16/06/2020 language also Sr. And when I want to create output PDF I got message error unparseable date. If I put that format 15.06.2020 in data mapper all data after that turn gray and unreachable and if I leave it 16/06/2020 data are readable but I get that message. My system format is 16.06.2020. Sr. Does anyone knows why it is happening and how to overcome it.

As the online help page explains:

Data format settings tell the DataMapper how to read and parse data from the data source. They don’t determine how these data are formatted in the Data Model or in a template. In the Data Model, data are converted to the native data type. Dates, for example, are converted to a DateTime object. How they are displayed in the Data Model depends on the current operating system’s regional settings.

So the Default data format parameters specify how to read the date from your file, so they should specify dd/mm/yyyy. Also, make sure to tick the Treat empty as 0 option.

To check which records are still causing an issue, you can click on the Validate all records in the Data menu: if any parsing errors are found, this procedure will show on which records they occur and you can then examine your data file to determine what caused the error.

Thank you on your reply, it was very helpful. Validating fields showed that there was one empty cell and it showed “” as its value. Even though I checked treat empty as 0 it still show error. Is it something related to cell formatting in xls, and I checked and there is no value and it is formatted as every other cell.
What might be the issue?

In your field’s Post function, enter the following code:

concat("01/01/0001").slice(0,9);

This will ensure that any empty date gets set to 01/01/0001 (of course, you can change that default value to any valid date you like).

Thank you very much .