Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an app where I need a column to return "No" for items older than 90 days. I am using the following to create this:
if(LastConnectionTime>=Today()-90, 'No', 'Yes')
Result:
It is working, but it is inaccurate. It is returning "Yes" for items newer than September 2020. As of the posting of this question, 90 days prior to today is January 14, 2021.
I'm also a bit confused about why I need to use ">" and not "<", but when I use "<" it returns "No" for current date through Sept 2020 and "Yes" for dates Sept 2020 and prior, so I guess ">" is correct? At this point, I am very confused.
maybe u need to convert LastConnectionTime to datetime 1st using timestamp#(),
if(num(timestamp#(LastConnectionTime,'M/D/YYYY h:m:s tt'))>=num(Today()-90), 'No', 'Yes')
hope this help,
if not, try to using Trim() after make that field as num.
try to format your date time field to number maybe could help,
if(num(LastConnectionTime)>=num(Today()-90), 'No', 'Yes')
Might be, ur field is in text format?
If not, try with Floor() function in both side
@MayilVahanan , @andykrst When I tried
if(num(LastConnectionTime)>=num(Today()-90), 'No', 'Yes')
the result is just all "Yes". So unfortunately that is not the issue.
maybe u need to convert LastConnectionTime to datetime 1st using timestamp#(),
if(num(timestamp#(LastConnectionTime,'M/D/YYYY h:m:s tt'))>=num(Today()-90), 'No', 'Yes')
hope this help,
if not, try to using Trim() after make that field as num.
That worked! Thank you so much.