Jump to content

This topic is 5124 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Howdy, all. Please refer to the attached file.

Goal: I have two CFs, one to calculate elapsed months and the other, years and months. On the surface they work fine except I'm having trouble getting a couple of conditions met.

Record 1: Works okay

Record 2: Works okay

Record 3: When there isn't a date in both Start AND End fields I want the result of both Span_mo and Span_yr_mo to be empty; the former I think I solved but Span_yr_mo...I can't seem to nail the correct syntax for the field's calc to null it.

Record 4: Span_yr_mo is correct in that only five months have elapsed (the date span is one day shy of being six months), but Span_mo...again, I just can't figure out what needs to be tweaked.

I've seen that some date-related calcs and CFs include +1 or -1 in their formulas but I can't put my finger on what effect they have...though I'm sure it has some bearing on my sought-after solution.

TIA for your help...and thanks, Stephen, for helping me with my attachment posting question.

Rich

test.fp7.zip

Posted

I don't see why you need custom functions for this:

'cause I'm a glutton for punishment? :S

I went the CF route because I'll be using the same formula in multiple tables throughout a solution so I thought it'd be smarter to create a CF than code the same calc for each table. That way, if I were to make a change to the CF I'd only have to make it once instead of having to revisit every instance of a calc...or am I in the ozone again? (I should know better than to ask that.)

Thanks for the fix!

This topic is 5124 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.