AnsweredAssumed Answered

How to identify current time when workflow run

Question asked by tkvo on Nov 11, 2016
Latest reply on Nov 14, 2016 by kapilkjoshi

I'm using Nintex Workflow 2010 and below what are I have:

I have a choice type variable (varCurHourSlot) and its options are Hour 1, Hour 2, Hour 3.

Another datetime type variable (varCurrentDateTime) and current time, when workflow is executed, is assigned to this varCurTime by using Calculate date action.

My question is how the logic would be to identify current hour is in which hour slot. I have tried using Set variable action with the If conditions below but it does not work.

 

fn-If(fn-And(fn-GreaterThan(7,fn-FormatDate(varCurrentDateTime,%h)),fn-LessThanOrEqual(16,fn-FormatDate(varCurrentDateTime,%h))),1,fn-If(fn-And(fn-GreaterThan(16,fn-FormatDate(varCurrentDateTime,%h)),fn-LessThanOrEqual(24,fn-FormatDate(varCurrentDateTime,%h))),2,3))

Please help! Thanks.

Outcomes