Adding days to a date field.

  • 1
  • 1
  • Question
  • Updated 2 years ago
  • Answered
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!
Photo of David Dziewit

David Dziewit

  • 220 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
use the Days(X) expression

[Policy Effective Date]+Days([Term Days])
Photo of David Dziewit

David Dziewit

  • 220 Points 100 badge 2x thumb
Worked like a charm! Thanks!
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,482 Points 20k badge 2x thumb
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:

(Edited)
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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.
(Edited)
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,482 Points 20k badge 2x thumb
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.
(Edited)
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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,
(Edited)