IF formula with date

Hi, I’m super new to using formulas. I’d like to do an IF formula for my “Published date” column with the “assigned week” column.

So if the dates are less than 2 weeks time it will get “first two weeks” if its more than two weeks it will get the “last two weeks”.

My formula:

IF({Published date}) < 14, “first two weeks”) ,IF({Published date}) > 14,“last two weeks”)

Please advised… Thanks in advance!

You’re probably looking for DATETIME_DIFF. Give this a try:
IF(DATETIME_DIFF({Published date}, TODAY(), "days") < 14, "first two weeks", "last two weeks")

That will check the number of days between {Published date} and Today, but it’s possible to replace TODAY() with another Date field.

Hope that helps.

Hey thanks, it works! new formula to play around with. I’m going to keep it to a month to month basis because anything that’s more than 14 days shows as “last two weeks”. :slight_smile:

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.