Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Datetime format changes when connecting to alteryx

OrlanViloria
7 - Meteor

Hi, I am struggling with the time format of a field. I have a .csv file with a field with datetime information 

For example, 

OrlanViloria_0-1593139005747.png

However, when I connect it to alteryx it looks like this 

OrlanViloria_1-1593139045211.png

Do you know why is this happening? 

Thank you!

 

8 REPLIES 8
OrlanViloria
7 - Meteor

I am referring to :00 PM that is missing

estherb47
15 - Aurora
15 - Aurora

Hi @OrlanViloria 

 

On initial glance, it could be a field length issue. Not sure if this will work, but drop a Select tool after the input, and change the length of that field to longer.

 

Let me know if that works.

 

Cheers!

Esther

OrlanViloria
7 - Meteor

Hi! I am trying with this configuration 

OrlanViloria_0-1593139990452.png

However, it did not fixed the problem

grazitti_sapna
17 - Castor

Hi @OrlanViloria , could you possibly share the sample workflow to figure it out? I tried creating one but gives correct output. Please refer to the screenshot. 

Note: While creating the csv file I converted the column to text.

grazitti_sapna_0-1593146759091.png

 

Sapna Gupta
OrlanViloria
7 - Meteor

Hi! The thing with my dataset is that I am extracting it from salesforce as .csv and thus using the default format to connect it in alteryx. I am not using excel to prepare data! Is there a way to solve it from alteryx?

Thank you

jarrod
ACE Emeritus
ACE Emeritus

@OrlanViloria what do you see for that field if you open the csv in a text editor? i wonder if excel is actually inferring the :00 PM when you open it. 

OrlanViloria
7 - Meteor

Hi, 

It has this format

OrlanViloria_0-1593281795891.png

The reason I want to be able to add the :00 is because without those zeros alteryx is not being able to convert it to datetime format with the datetime tool 

OrlanViloria_1-1593281954947.png

There you can see I am getting a null output.

 

Thank you! I would appreciate any advise with that.

jarrod
ACE Emeritus
ACE Emeritus

Simplest way I can think of is regex parse:

(\d{1,2}/\d{1,2}/\d{4})\s(\d{2}:\d{2})(:\d{2}:)*\s([a-z]{2})

 

That should split it up into the major pieces and you can add in the :00 to the second group.

Labels