Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8900059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:00:48+00:00 2026-06-15T01:00:48+00:00

is there a work around towards calculating the accurate contract end date for a

  • 0

is there a work around towards calculating the accurate contract end date for a closed deal in Salesforce? We have a field which calculates the contract end date based on the [ Revenue_Date__c + ( Contract_Length__c * 30) ] , however, this is based on the assumption all months have 30 days, is there a work around this to get a more accurate contract end date?
We are on a Professional edition of Salesforce.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:00:49+00:00Added an answer on June 15, 2026 at 1:00 am

    As far as I know it will be very tricky to do it with functions/formulas. You could start experimenting with this thing that finds the end of current month:

    DATE(
        YEAR(TODAY()),
        MONTH(TODAY()),
        CASE( MONTH(TODAY()),
            1, 31,
            2, IF( MOD( YEAR(TODAY()), 4) = 0, 29, 28),
            3, 31,
            4, 30,
            5, 31,
            6, 30,
            7, 31,
            8, 31,
            9, 30,
            10, 31,
            11, 30,
            12, 31,
            DAY(TODAY())
        )
    )
    

    You could try calculating the difference between days and the end of this year, next year etc (depending on the contract length) but it will be a very nasty solution. And I cry a little every time I see home-grown date handling “library”…

    Can you move the logic to apex? In a simple “before insert, before update” trigger it’d be very easy:

    for(My_Object__c o : trigger.new){
        o.Contract_End_Date__c = o.Contract_Start_Date__c.addMonths(o.Contract_Length__c);
    }
    

    In “before” trigger you get save to DB for free as a bonus 😉 So essentially same as users would see it if it’s a formula field.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to work around naming conflicts between Script# and other scripts
At work there's a bit of discussion around what client side framework we should
Is there a work around on how to create a constructor for static class?
Is there a work around (other than changing the column type to a textfield)
Is there any work-around with javascript/CSS for tabindex not working on Firefox on Mac
Why I'm unable to extend an abstract class. Is there any work around to
is there a work around on how I can pass the value from 'value'
Is there any work around for client side data binding in mvc. I'm looking
I work on an open source project focused around Biblical texts. I would like
is there any way i can make the following work, or is there a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.