function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TrimbleAgTrimbleAg 

Date Validation Issue

 

Here's the issue, I am using a formula text field to tell me if the support contract date has been reached, Expired if reached and Active if not. IF ( Expiration_Date__c < TODAY (), "Expired", "Active")  It works great! The issue is that I imported over 60k accounts where 90% of these date fields are blank, therefore any blank date is returning a value of active. 

I am pretty new at this so I apologize in advance if this is a simply issue, I've tried a few things to no avail. Any help would be greatly appreciated!!!

 

Thanks,

Pat

 

Best Answer chosen by Admin (Salesforce Developers) 
TrimbleAgTrimbleAg

Thanks for the help, for some reason it didnt work, the blank dates still came back as active, however you did put me onto the right track! This is what I ended up with to make it work.

 

IF ( (BLANKVALUE( Expiration_Date__c , DATEVALUE("2007-01-01")) < Today() ) , "Expired", "Active")

 

Thanks for the help!!!! It was greatly needed!!

 

Pat

All Answers

jkljkl

IF ( (BLANKVALUE( Expiration_Date__c ,  TODAY() +1) < Today() ) , "Expired", "Active")

 

This would work.

TrimbleAgTrimbleAg

Thanks for the help, for some reason it didnt work, the blank dates still came back as active, however you did put me onto the right track! This is what I ended up with to make it work.

 

IF ( (BLANKVALUE( Expiration_Date__c , DATEVALUE("2007-01-01")) < Today() ) , "Expired", "Active")

 

Thanks for the help!!!! It was greatly needed!!

 

Pat

This was selected as the best answer