Generate new date based on dataset data

Hi

I need to generate a new date from a date in a dataset. I can get the date but it is in string format, so to create a new date from that string I use the following:

nd = date_parser(__end_date)

This gives me the following error:

error: Built-in function ‘date_parser’ not found. Did you mean to call one of your lambda functions using date_parser.call()?

So how do I create a new date from a string?

Thanks

The function you want is called “date”.

date(__end_date)

From there you can add and subtract with:

date(__end_date) + random(1, 5).days # add between 1 and 5 days to __end_date