Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamically change Directory Tool using Date

NidhiAg
7 - Meteor

I am having folder structure as <BaseFolder>\2021\5. May\14 from which I am reading all files from Directory Tool.

Now I need to dynamically change 2021\5. May\14 to Year, month (n. MON) and day of the date user selected from Date Tool.

I am able to do Year part change but not sure how to map month and date in the formula

NidhiAg_0-1621014623183.png

Month logic would be

 

IF (DateTimeFormat(DateTimeToday(),"%m") = '04') THEN '4. April'
ELSEIF (DateTimeFormat(DateTimeToday(),"%m") = '01') THEN'1. January'
ELSEIF (DateTimeFormat(DateTimeToday(),"%m") = '02' ) THEN'2. Febuary'
ELSEIF (DateTimeFormat(DateTimeToday(),"%m") = '03') THEN'3. March'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '05') THEN'5. May'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '06') THEN'6. June'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '07') THEN'7. July'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '08') THEN'8. August'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '09') THEN'9. September'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '10') THEN'10. October'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '11') THEN'11. November'
ELSEIF ( DateTimeFormat(DateTimeToday(),"%m") = '12') THEN'12. December'

else '' endif

2 REPLIES 2
dougperez
12 - Quasar

Why dont you use 

DateTimeFormat([Date],"%Y")+"\"+DateTimeFormat(date,"%m")+"."+
DateTimeFormat([Date],"%b")+"\"+DateTimeFormat([Date],"%d")

instead?

dougperez
12 - Quasar

I attached a workflow, test the formula into your replace destination

Labels
Top Solution Authors