How to insert two Timer conditions
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.
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:
//myDate is a Date() field
LocalDate localDate = myDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
Calendar calendar = GregorianCalendar.getInstance();
calendar.set(localDate.getYear(), localDate.getMonthValue(),localDate.getDayOfMonth(), 10, 40, 39);
I'll leave you to sort out the time portion of your requirement :)
PS: As this reply answers your question, please mark as resolved by ticking the tick mark on the left of this reply.