In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

HTD formula

J054305
6 - Meteoroid

Is there a formula to identify semi annual? For example currently semi Annual date range would be 1/1/2022 to 6/30/2022

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@J054305 
I imagine that your input would be a list of dates given not input sample provided.
I use a index then comparing with each input date to check which semi annual they fall into.

I did not use DateTime function as you can see.

0414-J054305-1.PNG0414-J054305-2.PNG

danilang
19 - Altair
19 - Altair

Hi @J054305 

 

If the dates are in m/d/yyyy format like your example then your can use a formula tool with this

 

if ToNumber(Left([Date],FindString([Date],"/")))<=6 then
	"First Half"
else
	"Second Half"
Endif

 

 If the dates have been converted to ISO format(yyyy-mm-dd) then use

 

if DateTimeMonth([Date])<=6 then
	"First Half"
Else
	"Second Half"
Endif

 

In both cases, you're just checking for month<=6 

 

Dan

Labels
Top Solution Authors