Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!
SOLVED

Choose current year

Highlighted
7 - Meteor

Hi, I have a set of data that needs to filter out for current year.

 

I had inputted 

[Year]=ToNumber(DateTimeFormat(DateTimeToday(),"%yyyy"))

 into the filter but it doesn't seems to filter out 2020 (aka current year) for me. 

My data here [Year] are Int16 type.

terrellchong_0-1593761154537.png

 

Which part did I screw up?

 

Highlighted
Alteryx Certified Partner

Hey @terrellchong 

 

Try this instead:

 

[Year]=ToNumber(DateTimeFormat(DateTimeToday(),"%Y"))
Highlighted
7 - Meteor

Thanks!! 😃

Highlighted
7 - Meteor

Modify the formula- The correct format for yyyy in Alteryx is %Y

 

[Year]=ToNumber(DateTimeFormat(DateTimeToday(),"%Y"))

 

 It is working perfectly fine for me.

Labels