Alteryx Designer Desktop Discussions

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

If a date falls between 2 set dates, return a specific date.

ajohnson211
6 - Meteoroid

I have a column with dates (currently a string but I can easily change to date/time). If the dates are between the 1st-15th of any given month, I want it to return "month-15"

If the same column of dates is between the 16th-end of the month I want it to return the "month-last day of the month"

 

Would someone be able to help me with that?

13 REPLIES 13
binuacs
20 - Arcturus

@ajohnson211 One way of doing this

binuacs_0-1676314246000.png

 

ShankerV
17 - Castor

Hi @ajohnson211 

 

One way of doing this.

ShankerV_0-1676314396816.png

 

Many thanks

Shanker V

ajohnson211
6 - Meteoroid

This is a great start! Thank you! 
Now, how do I get the output month-day to be the month from the date processed?

ie: 

Date Processed:

1/18/2023 11:03:56

 

Date:

2023-01-18

 

Output:

January-31

 

ajohnson211
6 - Meteoroid

Thank you!! 

How do I get the output month-day to be the month from the date processed?

ie: 

Date Processed:

1/18/2023 11:03:56

 

Date:

2023-01-18

 

Output:

January-31

ShankerV
17 - Castor

Hi @ajohnson211 

 

Please find the expected result.

 

ShankerV_0-1676317309320.png

 

Many thanks

Shanker V

 

 

binuacs
20 - Arcturus

@ajohnson211 Updated the workflow

 

binuacs_0-1676316898222.png

 

ajohnson211
6 - Meteoroid

I appreciate the update, but it won't work for the year. I will eventually have dates for 2023, and I need it to read those  and give the correct Month output.

ajohnson211
6 - Meteoroid

Could you include a file for me to see? I cannot see your other two formulas.

binuacs
20 - Arcturus

attaching the workflow

Labels