How to use Time based if else statement inside the Decision Tree

0
I want to create a microflow that uses a decision tree where it checks whether the time of creation of a particular ticket is between 6am to 2 pm if yes it should automatically set the shift type as Shift A. However I don't know what expressions to use.
asked
1 answers
0

Aditya

You can use something like this:

parseInteger(formatDateTime($DateValue,'H')) >= 5 and
parseInteger(formatDateTime($DateValue,'H')) <= 13

or this if you need to use the UTC values

parseInteger(formatDateTimeUTC($DateValue,'H')) >= 5 and
parseInteger(formatDateTimeUTC($DateValue,'H')) <= 13

FormatDateTime options can be found

here: https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Hope that helps,

Mike

answered