How to insert two Timer conditions

Hello,

I have a process to do and I need to have two Timer conditions “date and time” to start a task.

I tried to put as a condition a variable of type date, but it still fails.

The date and time should be the same as entered in the form in the variables Date and Time.

Please help me.
Sorry for bad English.
thanks

You simply need to format the date and time as per the requirements, use a Script Connector to take the inputs from the form and return the correct format for the timer event.

Your script should look something like this:

//Assuming your date is in field myDate and time is in field myTime //myDate is a Date() field

LocalDate localDate = myDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();

//create calendar
Calendar calendar = GregorianCalendar.getInstance();
calendar.set(localDate.getYear(), localDate.getMonthValue(),localDate.getDayOfMonth(), 10, 40, 39);
calendar.getTime();

I’ll leave you to sort out the time portion of your requirement :slight_smile:

regards
Seán

PS: As this reply answers your question, please mark as resolved by ticking the tick mark on the left of this reply.

What import to get the error LocalDate?

Thanks!!

:slight_smile:

java.time.LocalDate

Java8…