Alteryx Designer Desktop Discussions

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

Date Time Format

Idyllic_Data_Geek
8 - Asteroid

I'm using datetimeformat in a formula to derive the file name when the workflow is executed. The new requirement is to have the file name start with 'YYYY-MM-DD' and then + additional file name. Any idea on how I can accomplish this? When I use the below it gives me an error when I put % after the datetime now

 

 

"\\File Location\DateTimeFormat(DateTimeNow(),"%d%b%Y")+ FileName " + ".xlsx|||Tab Name"

7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

change the formula to

 

"\\File Location\"+DateTimeFormat(DateTimeNow(),"%Y%m%d")+" FileName " + ".xlsx|||Tab Name"

 

Workflow:

atcodedog05_0-1635773283459.png

 

Hope this helps : )

Idyllic_Data_Geek
8 - Asteroid

worked like a charm except for one minor thing. It is giving me the result as 2021101 instead of 2021-11-01

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

My bad updated the formula.

 

"\\File Location\"+DateTimeFormat(DateTimeNow(),"%Y-%m-%d")+" FileName " + ".xlsx|||Tab Name"

 

Hope this helps : )

HomesickSurfer
12 - Quasar

Hi @Idyllic_Data_Geek 

 

I like using the FileGet formulas, and; DateTimeStart() instead of DateTimeNow()...

Try this:

 

Capture.PNG

Idyllic_Data_Geek
8 - Asteroid

Thank you

Idyllic_Data_Geek
8 - Asteroid

another question. My output file(excel) has 3 tabs. By default tab is only created when there is data entry. My new requirement is to create a tab regardless of any data present or not. How can I accomplish this?

HomesickSurfer
12 - Quasar

@Idyllic_Data_Geek 

 

Completely blank sheet (tab), or with field  and no records?

Labels