Help

IF formula with date

901 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Rachel_Lo
4 - Data Explorer
4 - Data Explorer

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!

2 Replies 2
Nick_Dennis
7 - App Architect
7 - App Architect

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”. :slightly_smiling_face: