 ShowAll Questionssorted byDate Posted AAI

# date formula with conditions

Hi all,

I created this formula to get a divisa number. The question is that I can´t use the operator " * " to calculate the figure. I would appreciate any idea?

IF ( BillingDate__c + Service_Term_months__c * 30 > DATE(YEAR(TODAY())+1,1,1),

IF ((NRC__c +  Incremental_MRC__c )* DATE(YEAR(TODAY())+1,1,1) -  BillingDate__c),

IF ( BillingDate__c + Service_Term_months__c * 30 < DATE(YEAR(TODAY())+1,1,1)),

IF(NRC__c +  (Incremental_MRC__c * Service_Term_months__c),null)

Thanks, Deepak Maheshwari 7

Hi,

Please let me know the data type for all fields which are used in formula field.

Then I will modify the formula as per your requirement.

Thanks

Deepak LBK
Hi AAI,

Your formula seems to be incomplete (both logic as well as syntax).

I have made syntactical correction. But still this doesn't seem to be correct in terms of logic.
```IF (BillingDate__c + (Service_Term_months__c * 30) > DATE(YEAR(TODAY())+1,1, 1),
IF ((NRC__c + Incremental_MRC__c ) * (DATE(YEAR(TODAY())+1,1,1) -  BillingDate__c)),
IF (BillingDate__c + (Service_Term_months__c * 30) < DATE(YEAR(TODAY())+1,1,1)),
IF(NRC__c +  (Incremental_MRC__c * Service_Term_months__c)),null)```

`IF (BillingDate__c + (Service_Term_months__c * 30) > DATE(YEAR(TODAY())+1,1, 1)`
If the above condition is true, you are checking the below condition
`IF ((NRC__c + Incremental_MRC__c ) * (DATE(YEAR(TODAY())+1,1,1) - BillingDate__c))`
if the second condition is true, you are checking the third condition
`IF (BillingDate__c + (Service_Term_months__c * 30) < DATE(YEAR(TODAY())+1,1,1))`
If this is true (technically not possible because this is the opposite of first condition), you are checking fourth condition
`IF(NRC__c + (Incremental_MRC__c * Service_Term_months__c))`
if the fourth condition is true, you are returning NULL.

This cannot be the complete logic.