Alteryx Designer Desktop Discussions

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

Excel Formula

Abhishekjoshua
7 - Meteor

Can someone help me achieve the below excel formula in Alteryx? similarly for month and year as well

 

Abhishekjoshua_0-1670585897845.png

15 REPLIES 15
IraWatt
17 - Castor
17 - Castor

Hey @Abhishekjoshua,

By the looks of that formula you are converting a Date to the format of a day with two digits. This can be done with the datetimeformat function like this:

datetimeformat([Q2],"%d")

Would you be able to give some sample data from Q2 for context?

 

Here is the docs on this function: DateTime Functions | Alteryx Help

DataNath
17 - Castor

Hey @Abhishekjoshua, to recreate the =Text function like this, you'll want to use the DateTimeFormat() function in Alteryx with the %d identifier, for month it'll be %m  and %y or %Y for a 2/4-digit year respectively.

 

If your dates aren't already in ISO format (YYYY-MM-DD) then you'll first need to convert them into that using the DateTimeParse() function. More info on all of that here: https://help.alteryx.com/20223/designer/datetime-functions

Abhishekjoshua
7 - Meteor

Hi @IraWatt, below is the column "Q" sample data in my scenario and the output I need is also attached. Please help. Thank you

 

Sample data: 

Abhishekjoshua_0-1670587004374.png

 

Output to achieve:

Abhishekjoshua_1-1670587051958.png

 

 

ShankerV
17 - Castor

@Abhishekjoshua 

 

Please find the expected output.

 

ShankerV_0-1670587309120.png

 

ShankerV
17 - Castor

@Abhishekjoshua 

 

Check and let me know if it worked as your expectation.

 

If not, can do some tweaks to get the desired result.

 

 

Abhishekjoshua
7 - Meteor

Hi @ShankerV , yes you got it right, that is the expected output

Can I know how did you achieve it? I got the date one right but the month and the year column is troubling.

Please help.

Abhishekjoshua
7 - Meteor

Please note that In your example the "Field1" data is different, hence you got 08, Jan and 2022

In my case the referred column data is in this format "8-Jan-22"

ShankerV
17 - Castor

Hi,

 

One sec, we can work on 8-Jan-2022 also.

ShankerV
17 - Castor

@Abhishekjoshua 

 

Please find the below output

 

ShankerV_0-1670588605456.png

 

Labels