Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
Rud_Annamh

Hello!

This should be easy, but is not working for some reason.

I would like to return a value in a number field of 0 if the date in a specific field is more than six months ago, or 2.5 if the date is within six months.

My formula is currently:

If( Proof_of_Address_Date__c  >  TODAY() +180, 2.5, 0)

But this is not providing the correct result.

Any help would be really appreciated. Thanks so much.

RArunraj

Hi,

The formula is

IF( Proof_of_Address_Date__c < TODAY() -180,0, 2.5)﻿

Thanks,

Arunraj

RArunraj

Hi,

The formula is

IF( Proof_of_Address_Date__c < TODAY() -180,0, 2.5)﻿

Thanks,

Arunraj

This was selected as the best answer
Rud_Annamh

Thank you RArunraj, that fixed it!

Shashikant Sharma

I am sorry mate but it looks to me that 180 is not the full proof solution.

Take an example if current date is 23rd june so date after 6 months should be 23 december but if you add 180 it will not give you 23 december.

Rud_Annamh

Hi Shashikant Sharma

You're right of course on the dates, but the solution provided solved specifically what I asked for i.e. 180 days.

I was looking for approx 6 months, doesn't matter to us in this instance if it's a few days more or less.

So, you're both right and thanks to you both!

RA

Shashikant Sharma

I just wanted to make you aware if you are missing something, happy to know your problem get resolved. Arunraj﻿'s formula is very effective and perfect if you want only approx six month.

Force Explorer

What is  the  syntax of  the  IF  statement ?

SAPOC

IF(logical_test, value_if_true, value_if_false)

Force Explorer

Thanks  mate