Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Formula to generate datetime and autofill every row with the same value.

MFish
8 - Asteroid

G'day,

 

I want to generate a Datetime stamp to add to a filename, which is then used for the output field in a batch macro. I've tried with formula tool, and some other options - trimming down to the hours etc, but using something like --> [Filename] + " " +DateTimeNow(). 

 

When i do it this way, the output changes with the time and splits the output files which is not ideal.

 

What I'd like to do is create one timestamp which is attached to every record with the filename, just not sure what path to take doing this - MultiRow formula is where I'm leaning but im a bit stuck on what logic to use. 

 

 

Cheers!

6 REPLIES 6
grazitti_sapna
17 - Castor

Hi @MFish , will it be possible for you to share a sample of expected output also what are you trying in the multi row formula so that we can try to debug this issue?

Just to clarify when you will use datetimenow function it will generate different current time every time you run the workflow.

 

Thanks.

Sapna Gupta
MFish
8 - Asteroid

Expected output would be;

FileName1 YYYY/MM/DD HH:MM

 

I'm able to generate this format, but because the time can change very rarely on the hour, and more commonly on the minutes - it has the potential to split my CSV output. 

 

I haven't been able to get a working formula going in the multi-row formula tool yet, I'm not sure if i need to first generate a filename+timestamp in the formula tool, then fill the first value down for all row via the multi-row formula tool?

 

And yes your clarification is correct! 

 

Thanks

vizAlter
12 - Quasar

@MFish — Special character / and : in the file name? 🤔

vizAlter_0-1604465925896.png

 

grazitti_sapna
17 - Castor

Hi @MFish, if the first question can be modified into something like Test 2020-11-04 10.30 then it is working perfectly.

 

grazitti_sapna_0-1604466550586.png

 

For multi row query

grazitti_sapna_1-1604466809150.png

grazitti_sapna_2-1604466818094.png

 

 

 

grazitti_sapna_0-1604466797754.png

 

 

Thanks.

 

Sapna Gupta
MFish
8 - Asteroid

Absolute legends, i actually figured out another way to do it - but thanks so much for going to the effort!

grazitti_sapna
17 - Castor

@MFish , you can also post the solution that you worked on maybe it will help us and others in other cases. 🙂

 

Thanks.

Sapna Gupta
Labels