Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

converting to dates

Inactive User
Not applicable

I am trying to convert dates of the format Jan 1, 2011 via the date time tool

msoe4142_1-1606377143911.png

 

 

 

However it is not working. Any reason as to why? It only gives Nulls.

10 REPLIES 10
Per
11 - Bolide

Hi @Inactive User 

 

When using the DateTime tool, you need to either select an existing configuration, or create one yourself. In your case, there is a default configuration that matches your input. Try and select the marked format in your workflow, and believe it should work.

 

Per_0-1606377793361.png

 

Qiu
20 - Arcturus
20 - Arcturus

@Inactive User 
I think it should be something like this.

Capture.PNG

Inactive User
Not applicable

Why won't the one I have work? I am wondering why my configuration is failing? Thanks

Inactive User
Not applicable

What if I want the output to be 01-01-2011? 

Per
11 - Bolide

Hi @Inactive User 

 

You have set your expected input as yyyy-MM-dd hh:mm:ss which does not match the date format you have written. Your input starts with "Jan ", but the tool expect the first 4 characters to be the year, hence it fails with a Null value

 

Regarding the format of the output, Alteryx has a set format for dates when working with the data. If you want to output the data into Excel, then Excel will accept the data as a date and convert it to your default format. If you need Alteryx to output the data elsewhere in that specific format, you can convert it to a text string before outputting

atcodedog05
22 - Nova
22 - Nova

Hi @Inactive User 

 

The issue is you need to give input date format (Mon dd,yyyy) the format you are giving it yyyy-MM-dd hence its giving null

atcodedog05_0-1606378064844.png

Try below config

atcodedog05_1-1606378161627.png

 

Hope this helps 🙂

messi007
15 - Aurora
15 - Aurora

@Inactive User,

 

in the date convert you have to choose the input format not the output.

So the format will be mon dd, yyyy.

The output default date format for convert date is yyyy-MM-dd.

 

Hope that helps,

Best Regards,

 

Inactive User
Not applicable

So with a RegEx, we always have to use custom, if I understand correctly?

atcodedog05
22 - Nova
22 - Nova

@Inactive User 

 

Basically if you dont have the format in the list then we will be using custom like in the current scenarios.

Labels