1

I have one date field DOJ(date of joining). I have to create one formula field "CONFIRMATION DATE" where the date value will be DOJ+ 6months( whenever i enter some data in DOJ field). So how to do that any suggestions...

2

There is one good formula in the docs :

(assuming your DOJ API name is DOJ__c)

DATE(
  YEAR( DOJ__c ) + FLOOR( ( MONTH ( DOJ__c ) + 6 - 1 ) / 12 ),
  MOD( MONTH ( DOJ__c ) + 6 - 1 + 
    IF( DAY ( DOJ__c ) > CASE( MOD( MONTH( DOJ__c ) + 6 - 1, 12 ) + 1, 
      2, 28,
      4, 30,
      6, 30,
      9, 30, 
      11, 30,
      31 ), 1, 0 ), 12 ) + 1,
    IF( DAY( DOJ__c ) > CASE( MOD( MONTH( DOJ__c ) + 6 - 1, 12 ) + 1,
      2, 28, 
      4, 30, 
      6, 30, 
      9, 30, 
      11, 30, 
      31 ), 
    1, DAY( DOJ__c )
  )
)
| improve this answer | |
1

Thank u. this code helped

DATE( 
   YEAR( DOJ__c )
   + FLOOR(6+ MONTH( DOJ__c ) )  / 12
     -  IF (MOD(MONTH(DOJ__c)+6,12)=0,1,0)


   ,MOD((6 + MONTH( DOJ__c )-1 ),12)+1 
   ,DAY( DOJ__c )
  )
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.