Alteryx Designer Desktop Discussions

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

Date time difference and output as Date

AJ-CH
8 - Asteroid

Hello, 

I am trying to use a date-time difference formula to get the date as output. Need to subtract 365 days from the Max_Dateofservice field and the out should be a date. 

DateTimeDiff([Max_Dateofservice],'-365', u), what I should replace u with  to get the date. If [Max_Dateofservice] is 01/01/2020 then after this function I will need output as 01/02/2019

 

Please suggest.

 

 

 

 

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

If I wanted to subtract 365 days from a date, I'd use:

 

DateTimeAdd([Max_Dateofservice],-365,"days")

 

 cheers,

 

Mark 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
AJ-CH
8 - Asteroid

@MarqueeCrew

thanks for your response. I thought if I will use days then it will give me output as the difference between the days but I got the actual date... Thanks a lot 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@AJ-CH ,

 

 no worries. With alteryx you can trial and error your way through most challenges. I use it often. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels