Camunda platform 7 rest client date formats

Hi Forum,

I’m trying to use the camunda-platform-7-rest-client to use with date parameters with no success.

More specifically because we use a legacy date format (Date), I cannot format the date correctly for Camunda to accept it. yyyy-MM-dd'T'HH:mm:ss.SSSZ.

I was trying to filter a HistoricProcessInstanceQuery using the startedAfter parameter with no success.

Is there something I’m doing wrong here, or does this dateFormat need changing?

can you show us your code?
It’ll be easier to help you.

//create a new Date 
Date firstDateOfYear = Date.from(;
//create Query instance
HistoricProcessInstanceQueryDto historicProcessInstanceQuery = new HistoricProcessInstanceQueryDto();
//startedAfter only takes Date format, due to legacy setting as in original post.
//fails due to wrong date format