Discussions

Expand all | Collapse all

Adding days to a date field.

  • 1.  Adding days to a date field.

    Posted 04-04-2017 19:53
    I have policies that expire in a specific number of days. Using the AdjustMonth function causes the expiration to be inaccurate. I have a numeric field with the number of days. "Term Days"
    How do I calculate the expiration date base on the effective date?
    Fields are "Policy Effective Date" which is a date field and "Policy Expiration Date" which is a Date - Formula field. 
    Thanks!


  • 2.  RE: Adding days to a date field.

    Top
    Contributor
    Posted 04-04-2017 19:55
    use the Days(X) expression

    [Policy Effective Date]+Days([Term Days])


  • 3.  RE: Adding days to a date field.

    Posted 04-04-2017 20:06
    Worked like a charm! Thanks!


  • 4.  RE: Adding days to a date field.

    Top
    Contributor
    Posted 04-04-2017 21:19
    Henceforth please place all of your formulas (and script etc) inside a <pre> element. This will make my job of scraping all the formulas out of the forum for testing my formula parser much easier and the formulas will be easier to read in a monospace font:
    [Policy Effective Date]+Days([Term Days])
    To place your formulas in a <pre> tag just type or paste your formula as normal, then highlight the text and press the pre icon as shown below:



  • 5.  RE: Adding days to a date field.

    Top
    Contributor
    Posted 04-04-2017 22:37
    Are you using the community API or a console to scrape the forum?  You have my attention.  

    And sorry I forget sometimes to put the equations on the <pre> element.


  • 6.  RE: Adding days to a date field.

    Top
    Contributor
    Posted 04-04-2017 22:49
    I don't know what the community API is. Is that a thing?

    I am going to scrape formulas from:

    (1) the entire forum
    (2) all applications in the Exchange
    (3) every client application for which I have permission to harvest from
    (4) applications from users in other quadrants whose QuickBase technology adoption has terraformed at a faster rate than here on Earth

    As well as offering a script to users to extract all of their formulas in their account or a specific application. The only trick here is that I can't use the API because it is very unlikely random users have a common API key set up across all of their assets.


  • 7.  RE: Adding days to a date field.

    Top
    Contributor
    Posted 04-07-2017 02:38
    Dan,

    Just in case you wanted to scrape thing out even more.
    https://education.getsatisfaction.com/reference-guide/api/api-resources/

    You could even build a more complete and accurate "knowledge Base" by cleaning out the junk in here (like this comment)

      I feel like the moderators are not doing a very good job marking things as answered so it clears the list and people can find the answer easily.

    Alas,