Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula Help?

Brad1
11 - Bolide

Trying to use the formula tool to turn this:

 

M-F,9:00AM-5:00PM;SA,7:00AM-8:00PM;SU,CLOSED

 

To:

 

MO,9:00-5:00PM;TU,9:00-5:00PM;WE,9:00-5:00PM;TH,9:00-5:00PM;FR,9:00-5:00PM;SA,8:00AM-7:00PM

 

Any help would be appreciated.  I'm guessing something like if left 3 then MO + plus mid 7 elseif Wildcard "Closed" - Somehow trim that.   The fly in the ointment is they could be close on a Tuesday. 

 

Sometimes, the days are all spelled out due to different hours M-F.  I assuming one large if-then can do it?

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

I would suggest doing it as a lookup to replace the M-F (and other cases as needed).

 

You can then join and process (e.g. filter closes) before putting back together as a single string.

2017-10-31_13-07-20.jpg

 

A Regex approach would be possible I think the above is simpler

Brad1
11 - Bolide

Works great!   Thanks!

Labels
Top Solution Authors