We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Date time formular

Shaopingfu
7 - Meteor

If I want to have value "yes" when the month in date list is in Apr, and "No" for date in any other months, how can I use the date time phrase? 

 

DateValue
4/30/2021Yes
8/7/2021No
3/25/2022No
4/28/2022Yes
2/18/2023No
4/12/2023Yes
6/9/2023No
11/17/2023No
4 REPLIES 4
ShankerV
17 - Castor

Hi @Shaopingfu 

 

This can be achieved with the help of Formula tool.

 

IF Left([Date],1) = '4'

THEN 'Yes'

ELSE 'No'

ENDIF

ShankerV
17 - Castor

Hi @Shaopingfu 

 

Step 1: Input tool

 

Screenshot 2024-04-23 094431.png

Step 2: Formula tool

Screenshot 2024-04-23 094524.png

 

Many thanks

Shanker V

Shaopingfu
7 - Meteor

Thanks. Can i have other solution about if Left [Date], 1,="4" . I may have other format of the date, maybe yyyy-mm-dd or yyyy-Apr-dd or dd-mm-yyyy & etc. 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @Shaopingfu ,

 

You may want to check the solution of this weekly challenge.

#4 Date Parsing

It contains a variety of date formats.

 

Good luck!

Labels
Top Solution Authors