Hii Team,
I hope you are doing well.
Following is my data:
I want to make a new column as a period in the dataset with the following range and conditions based on the time value mentioned in the departure time column:
1) Early Morning is (4:00 to 7:59)
2) Morning is (8:00 to 11:59)
3) Mid-day (12:00 to 15:59)
4) Evening (16:00 to 19:59)
5 Night (20:00 to 23:59)
Any help will be appreciated. Thank you in advance.
Solved! Go to Solution.
Hello,
Please refer below formula and sample output.
if [Departure Time]>='04:00:00' and [Departure Time]<= '07:59:00' then 'Early Morning' elseif [Departure Time]>='08:00:00' and [Departure Time]<= '11:59:00' then 'Morning' elseif [Departure Time]>='12:00:00' and [Departure Time]<= '15:59:00' then 'Mid-day' elseif [Departure Time]>='16:00:00' and [Departure Time]<= '19:59:00' then 'Evening' elseif [Departure Time]>='20:00:00' and [Departure Time]<= '23:59:00' then 'Night' else '' endif
Hi @Vishz14
I would recommend creating a Text Input with your categorization table like you have above. Include one field for start time, one field for end time, and the name of the category. You can then use an Append tool to attach this to your set of data. Finally, use a Filter tool to only keep where your Departure Time is >= the start time and Departure Time is <= the end time. This should get you what you're looking for.
Hii Team, Thank You so much for the help. The solution really helped.