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
14 - Magnetar
14 - Magnetar

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
14 - Magnetar
14 - Magnetar

@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