Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Condition if Time is within a range

Mario36
8 - Asteroid

Hi All,

I am looking to apply a condition to the attached data where

1. If the time is between 7:00AM and 4:00PM give a result as "Working Hours"

2.If the time is between 4:01PM and 11:59PM then give me "After Working Hours"

3. If the time is between 12:00AM and 6:59AM then give me "Before Working Hours"

 

5 REPLIES 5
DataNath
17 - Castor

Had a quick scroll through and this seems to check out for your example but please do let me know if there's issues when applying it to a larger dataset:

 

DataNath_0-1664202882759.png

binuacs
20 - Arcturus

@Mario36 One way of doing this

binuacs_0-1664203022837.png

 

dana_mcdonough
Alteryx Alumni (Retired)

Hi @Mario36 - take a look at this article which uses the DateTimeParse function: Multiple-IF-condition-for-Date-and-time . This combined with an IF statement should get you what you need!

CarliE
Alteryx Alumni (Retired)

Hi @Mario36 

 

Take a look at this workbook

 

If this helped to solve your problem, please mark it as a solution

Carli
Mario36
8 - Asteroid

@DataNath  Thank you. This helps.

Labels