# If statement using date less than number of days

Options
✭✭✭✭

Hi, I am trying to write a statement so say if the date in the column is over 10 years from that date, I need to flag it if not then no flag. Any suggestions?

• ✭✭✭
Options

An easy way, adding 3.650 days to that day. And IF(DATE+3650<TODAY(); 1; 0)

Something like this. Take into account that you would have a couple of leap.years, so maybe better add 3.652 days

• ✭✭✭✭
Options

Hi, that is not working. I have a column that has a date that I need to add the 10 years to 3650 days. Any other suggestions?

• ✭✭✭✭✭
Options

Hi @sholmes,

Are you trying to determine if the date is 10 years before today, 10 years after today, or within 10 years of today in either direction?

Thanks.

• ✭✭✭✭
Options

@DKazatsky2 I am trying to determine if the date is 10 years after the date that is listed in the column. The dates in the column vary by the project, if it has been 10 years since that date we need to know so wanted it flag to make it stand out so the viewers will take the additional step when needed. I also need to know if it's 10 years after the date in the column and if there is a value in another column, this is what I need to trigger the flag.

• ✭✭✭✭✭
Options

Give this a try.

=IF(Date@row + 3650 < TODAY(), 1, 0)

Change the semi-colon to coma in the original formula suggested.

Hope this helps,

Dave

• ✭✭✭✭
Options

Thanks @DKazatsky2 but it is still not working

I am using =IF(QQ. Acquisition Closing Date@row + 3650 < TODAY(), 1, 0) b/c the column name is the one that starts with QQ that has the original date that I am trying to determine 10 years after. I get the #unpearsable message.

• ✭✭✭✭✭
Options

If a column name has spaces, it needs to be inside square brackets - [].

=IF([QQ. Acquisition Closing Date]@row + 3650 < TODAY(), 1, 0)

• ✭✭✭✭
Options

Thanks, all set now. I really appreciate it!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!