0

Date calculation

I'm working using the date functions. I've been able to use them to calculate a date at [specified date]+1 year, or +1 month, or +1 day ("1" =N in these cases). But I've run into something that I don't know how to solve. I've got a date, and I want to derive a date that's 120 days in the future. I don't have the future date, I just have the starting date and a specified number of days (which is larger than days in the month). How should I approach this?

TIA for any assistance.

3 replies

null
    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    using todays date then it is .... today() + 120

    or if reffering to an exsisting field..

    example - if your field is called say xDate

    you could also add a formula field and in that field add the scrip

    xDate + 120

    or you could even add the variable date range to a number field so you can freely change

    • zenmom
    • 2 yrs ago
    • Reported - view

    Thanks for your suggestions. I created a field which used a date field name plus 90 (the number of days), and got a plausible result: 'date filled' + 'supply in days' resulted in a date that was the appropriate time out from the 'date filled' date value. So, progress!

    However, when I put the same formula in a different field (and to be absolutely sure, I copied & pasted), this is the result I got: 1636084800000

    The only thing that looks different between the two field edit screens is that the Number Format box is blank in the first one, and has a zero (0) in the second one. Since it was different, I tried to delete the '0' but wasn't able to. 

    Any ideas on this particular puzzle?

    • zenmom
    • 2 yrs ago
    • Reported - view

    Ha! I was right. I deleted that field and then re-created it, being careful to not specify a number format. Now I'm getting a date, instead of a long string of numbers. 

    I would still be interested to know if there's a way to clear the Number Format field short of deleting and recreating it. 

Content aside

  • 2 yrs agoLast active
  • 3Replies
  • 350Views