URGENT --How to create switch case for different time in minutes?

Hi,
I want to create switch case of int32 where I want to switch between

  • 1 convert.ToInt32((now.Minute)) >0 and <14
    do something

  • 1 convert.ToInt32((now.Minute)) >14 and <30
    do something

  • 1 convert.ToInt32((now.Minute)) >30 and <44
    do something

  • 1 convert.ToInt32((now.Minute)) >44 and <59
    do something

Any suggestion pls…

Hi,
How about using convert.ToInt32((now.Minute/15))
It will give you 0,1,2,3 for intervals 0-14, 15-29, 30-44, 45-59

Cheers

3 Likes

Hello @ANSHUL
After dividing the number you can use Math Functions floor method to remove decimal and place that value in Switch Activity Check this workflow for better understanding.
UsingMathMethod.xaml (5.1 KB)

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.