Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Date Format Issue

SH_94
11 - Bolide

Hi Community,

 

I had encountered the original data date which contain the following:

Jacob_94_0-1615266882102.png

May i know how can we use Alteryx to identify if there is any date format as shown as above and update it to the correct date format : 2020-11-20.

 

Thank you for your time

10 REPLIES 10
Qiu
21 - Polaris
21 - Polaris

@SH_94 
We may have to do the brutal way.

CaptureB1.PNG

SH_94
11 - Bolide

Hi @ Qiu,

 

Can you briefly explain when do we need to use REGEXMATCH function and how to use it as it seems complex to build the formula? I would like to understand it so that i can edit and tailor to my data . Can we use this REGEXMATCH formula as well if we have the data date below?

Jacob_94_0-1615268228005.png

Previously i use the DateTimeParse to edit the data as below and it give me the result as below. Could you please advise how to edit it?Basically i want the result in date but the data produce give me result in numbers

Jacob_94_1-1615268409595.png

 

 

 

Qiu
21 - Polaris
21 - Polaris

@SH_94 
The row#2 and #5 are not possible to parse, OK. maybe possible for these two data.

But when it comes to 2020-04-05, there is no way we can know which is day, which is month.

RegEx_match is to search the patttern with Regex, if fits then parse.

SH_94
11 - Bolide

Hi Qiu,

 

If that is the case, may i know how can we solve it for the format below ?as i got plenty of data shown as per the screenshot below .

Jacob_94_0-1615270542080.png

Is there any way we can segregate it out and build another formula for this type of data?

 

Thank you.

Qiu
21 - Polaris
21 - Polaris

@SH_94 
What is the Product Result(Date)?

Which one you want to convert? the first column or the second?

Emil_Kos
17 - Castor
17 - Castor

Hi @SH_94,

 

I have found this post in the community:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Convert-excel-numeric-date-to-date-for...

 

Thanks to that I have created this workflow:

Emil_Kos_0-1615274585509.png

 

If you want to change the number (44155) you just need to use the below formula:

 

ToDate([date])

 

Output:

 

Emil_Kos_1-1615274625718.png

 

 

Qiu
21 - Polaris
21 - Polaris

@Emil_Kos 
Nice one.

Until now, I learned that ToDate Fucntion can be used to convert UNIX Epoch time

SH_94
11 - Bolide

Hi Qiu ,

 

I actually want change the first column from string to date but after i applying Date Timeparse, it become number at the end.

Emil_Kos
17 - Castor
17 - Castor

Hi @SH_94,

 

The first column: 2020-11-20 is in actual date format so it should be working.


If it will not work you can use this formula:

DateTimeParse([Field1],'%y-%m-%d')

 

 

Labels
Top Solution Authors