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

Havin a Little Trouble

UrsineBoaz
7 - Meteor

Hello I'm new to Alteryx. I've been working on the ADAPT course for about two weeks now with out much to say. Other than glowing reviews! But yeah seriously I can't get the hang of the Date/Time tool. Maybe I got a bit too cocky because the tool itself seemed pretty easy, but the last section of the tryout has got me all messed up. The issue is this: I need to convert  a column of dates that  are formatted as; 2019:01:05---23|59|23 into a yyyy-mm-dd hh:mm:ss expression, and I'm getting a whole lot of null no matter what. I'm still a newby-rube so I'm having trouble implementing formula functions. I also am trying not to get ahead of myself. If anyone has any hints or clues that could let me put this problem to rest I would be quite appreciative.

Thank you,

 

Boaz Bair

4 REPLIES 4
mbarone
16 - Nebula
16 - Nebula

Hello @UrsineBoaz ,

That's a tough format for the DateFormat tool to recognize.  In this particular case I would go right to a Formula tool and use a series of nested "Replace" functions.  There are also many different ways to approach this.  With Alteryx you'll learn there are many ways to get to a solution.

 

For me, personally, I would create a new field with a formula tool called whatever you like.  And then use the formula Replace(Replace(Replace([Datetime],':','-'),'---',' '),'|',':').  And make sure to make it a "DateTime" data type.

UrsineBoaz
7 - Meteor

Thank you for help. I had to tinker around abit but I have much clear idead of how to use formula now.

 

CharlieS
17 - Castor
17 - Castor

Hi @UrsineBoaz 

 

Here's an alternative solution. The DateTimeParse( function allows you to use markers to identify the date and time data points in a field an output them in the standard DateTime field formation (ISO 8601): 

 

DateTimeParse([Field1],"%Y:%m:%d---%H|%M|%S")

 

Where [Field1] is the input field where the current value is stored. I've attached an example of this formula in action. To learn more about the DateTime functions in Alteryx, here's a link to the documentation:

https://help.alteryx.com/current/designer/datetime-functions 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@UrsineBoaz ,

 

 I'm Mark (MarqueeCReW) and hope that you're enjoying Alteryx and will find your post-pandemic career improved because of your ADAPT experience. I'm a community leader and thank both @CharlieS  and @mbarone for their responses to your challenge. 

I'm going to mark both of their responses as accepted on your behalf. If you have further questions, please feel free to ask. 

cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels