In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

DateTimeAdd function

TabsheerMohamed
7 - Meteor

I was trying to work on a custom date which was created by one of my colleagues, the formula looks something like this: DateTimeAdd(DateTimeToday(),-1,'day'),

which shows the yesterday's date, everyday it will take previous 1 day date. But I wanted to get something which gives me a year date for my analysis. I tried changing the parameter, nothing works, let's say I am using DateTimeAdd(DateTimeToday(), -12,'month') - it gives 18th of Jan 2022 that's it, instead I want the dates starting from Jan 18th, 2022, to until today.

 

Can someone please help me with this issue.

5 REPLIES 5
BS_THE_ANALYST
15 - Aurora
15 - Aurora

See attached workflow. I think it's doing what you want?

BS_THE_ANALYST_0-1674066320112.png

 

All the best,
BS

LinkedIN

Bulien
Felipe_Ribeir0
16 - Nebula

Hi @TabsheerMohamed 

 

You can use the generate rows tool to do it

 

Felipe_Ribeir0_0-1674066471655.png

 

TabsheerMohamed
7 - Meteor

THANK YOU SO MUCH :) IT WORKS REALLY WELL

BS_THE_ANALYST
15 - Aurora
15 - Aurora

@Felipe_Ribeir0 It didn't occur to me that the Generate Rows tool has an optional input anchor. Your method is much more elegant.

All the best,
BS

LinkedIN

Bulien
Shoujain
7 - Meteor

My solution

Labels
Top Solution Authors