+ Start a Discussion
Andrew Hoban 6Andrew Hoban 6 

Formula field depending on date range

HI,

Im looking to reate a formula text field that will bring back either 'Yes' or 'No' depending on a date range. If the date falls between 25/15/2105 and 10/05/2016 then it should bring back Yes.

Thanks
claperclaper
create a formula field with return type of Text.
Enter this as the formula:
IF(your_custom_field__c >= DATE(2015,2,15) && your_custom_field__c <= DATE(2016,10,05), "Yes", "No")

 
Arun KumarArun Kumar
Hi Andrew,

Try below code
IF(
AND(DATE(2015,12,25)<=TODAY(),
TODAY()<= DATE(2016,05,10)),
'Yes',
'No')
Replace TODAY() with [Your Date].

Thanks,
Arun

 
Sudipta DebSudipta Deb
Hi Andrew,

You can use this formula field -
IF( sudipta__My_Date__c >= DATE(2015,05,25) && sudipta__My_Date__c <= DATE(2016,05,10) , 'Yes', 'No')
Thanks,
Sudipta Deb
 
Steven MontgomerySteven Montgomery
I'm look to return a text value based on a date field. We have a "Date Acquired", and "New vs. Repeat"  field on the Account page. I want the New vs. Repeat to return a value based on thr date in the Date Acquired field. If the Date Acquired is in the CURRENT fiscal quarter it would return "New". If the Date Acquired is not in the current fiscal quarter it would return "Repeat". I'm really stuck on this one