Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula

Lkschwe
7 - Meteor

I am trying to write a formula to list "Y" if Last Login date is <= 90 days from today's (current date) - see below:

 

IIF([Last Login])<=90"days"([2021-030-18]"Y","N")

 

What am I doing wrong?

2 REPLIES 2
CarliE
Alteryx Alumni (Retired)

Hi youll want to use the datediff fuction 

 

if DateTimeDiff(DateTimeToday(),[date2],'days')<=90 then 'Y' else 'N' endif

Carli
Luke_C
17 - Castor
17 - Castor

Hi @Lkschwe 

 

Try this. I'm using the 'datetimediff' function to determine the number of days between today and the last login date. This assumes your last login field's data type is set as a date. Hope this helps. 

 

IIF(datetimediff(datetimetoday(),[Last Login],'days')<=90 , "Y" , "N" )

 

Labels
Top Solution Authors