Alteryx Designer Desktop Discussions

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

"0" is missing in the output csv file

Nina00000
7 - Meteor

Dear comunity,

 

i have issue of "0" is missing in output csv file - even in the designer display shows "0".

 

for example,

I need "Time" column with "YYYY.MM" format. e.g. (2020.10)

 

Formura i currently use is following:

Replace(Substring(DateTimeAdd(DateTimeToday(),-1,"month"),0,7), "-", ".")

 

In the alteryx design tool, result is displayed as "2020.10".

However, when i open output csv file, the cell is wrriten as "2020.1" - missing "0")

 

 

also, i have same issue of leading 0 is missing in the out put file in other kind of ID column.

 

could you please kindly share the solution..?

 

 

14 REPLIES 14
Emil_Kos
17 - Castor
17 - Castor

Hi @Nina00000,

 

Change the data type to string and it should work.

If it is already strung please let me know.

 

If this was something helpful please mark as a solution!

Thanks!

atcodedog05
22 - Nova
22 - Nova

Hi @Nina00000 

 

Just a hunch in the formula tool Time column datatype might be set as double (something numerical) hence it might droping the '0' changing it to string might work.

 

At the same time it could be caused by .csv file type also.

atcodedog05
22 - Nova
22 - Nova

Hi @Nina00000 

 

Here is an example.

Output: in a csv file

atcodedog05_0-1603956003285.png

Workflow:

atcodedog05_1-1603956031187.png

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

Nina00000
7 - Meteor

Hi Emil,

 

thanks for your advice,

 

i changed the format to "String", but having same issue...

in display it looks okay, but in csv, it is still missing 0..

 

Thank you!

Nina00000
7 - Meteor

Hi thank you for your prompt advice :)!!

 

 

i had changed data format to "String", but having same issue...

 

in designer it is okay, but in csv, it is missing "0"...

 

Thank you!!

atcodedog05
22 - Nova
22 - Nova

Hi @Nina00000 

 

If you check the example workflow its working. Dont know where exactly its falling through.

 

Can you share your workflow and sample of data. We can take a look into it. 

Emil_Kos
17 - Castor
17 - Castor

Hi @Nina00000,

 

Can you test if this will work for excel files? 

It would be good to check if this is actually issue with csv file.

 

The additional thing that I have on mind is the size of the field. Maybe it gets truncatenated because it is too small.

 

Emil_Kos_0-1603956796809.png

 

Nina00000
7 - Meteor

Dear Emil Kos,

 

thanks for your input.

 

I have tried with excel format.

When I output in Excel 1) became 2020.10 with no problem, but I need csv format for system upload....

 

I dont know how i can solve this csv specific issue..

atcodedog05
22 - Nova
22 - Nova

Hi @Nina00000 

 

Is it possible to provide your workflow and sample data. So that we can troubleshoot since it seems to be working in the example scenarios above.

 

And can tell us your Alteryx version

Labels