You need to sign in to do that
Don't have an account?
Bill Demuth
complex date formula
I am working with compex commision formulas.
I have 95 percent worked out, but have a final challenge
I think I need a custom field, a checkbox, which answers a simple question
Is the "Billing Date" field value OLDER than the first of last month.
Will start as no, and will change to yes, Would be easy if all months had equal days but they do not :(
I am open to other suggestions but any of them will need some formula to anser this question
Thanks in advance!!
I have 95 percent worked out, but have a final challenge
I think I need a custom field, a checkbox, which answers a simple question
Is the "Billing Date" field value OLDER than the first of last month.
Will start as no, and will change to yes, Would be easy if all months had equal days but they do not :(
I am open to other suggestions but any of them will need some formula to anser this question
Thanks in advance!!
You need a checkbox with formula like the below.
Billing_Date__c > DATE(YEAR(Billing_Date__c), MONTH(Billing_Date__c)-1, 1)
The last day of a month is also the previous day of the first of the next month (and here it is always 1st ).
We calculate it easily by building a date like: date ( year ( mydate__c ) , month ( mydate__c ) + 1 , 1 ) - 1 ( month + 1, 1st , - 1 day )
There are just a case for December and it is always 31st of December for the last day.
IF( MONTH( mydate__c ) = 12, DATE( YEAR( mydate__c ), 12, 31 ), DATE( YEAR( mydate__c ), MONTH( mydate__c ) + 1, 1) - 1)