Setting expression in Time Event is throwing error

I have time Event where I am using Time definition type as “Date” and uisng expression as

where startDate is the date variable set in previous form. when I am Trying to complete the the task its giving below error.

Cannot submit task form af217643-d634-11e9-b971-54bf649b047a: Error while evaluating expression: ${dateTime().parse(startDate).minusDays(1).toDate()}. Cause: java.lang.IllegalArgumentException: Invalid format: “Fri Sep 13 00:00:00 IST 2019”

my requirement is to do subtraction of 1 day from the Date which I Have selected in previous form.
please help me .

@abhi1o3 Timers are configured using an ISO 8601 time format. Date should be specified as UTC format like 2016-03-11T12:13:14 or UTC (e.g., 2016-03-11T12:13:14Z ) or with a UTC-relative offset (e.g., 2016-03-11T12:13:14+01 ).

You should use like this ${dateTime().minusDays(1).toDate()}.

Parsing the date will return string representation of date value. So you can use dateformatter to parse date in ISO format like yyyy-MM-dd'T'HH:MM:ss SSSZ

Refer these below posts will be helpful: