Blank date fields in data

I have a datamapper where some fields are defined as Dates. My problem is that not all records have these fields populated and when any of these fields are blank I get an “unparseable date” error.

I’ve seen similar with currency fields but these have the “Treat empty as 0.00” option which resolves the problem. There doesn;t seem to be an equivalent for dates…Any ideas are welcome.
(I’m using PReS 2020.2).

In your Extraction properties for that Date field, add the following Post function:

concat("1901-01-01").slice(0,10)

This ensures that an empty date is replaced with 1901-01-01 (you can pick the date you want, obviously). You may have to adjust the slice() values slightly, depending on the date format your data contains.

Thanks Phil. That works now.:grinning: