Jump to content

Date Range Calc?


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

Recommended Posts

Hello all... This would be the final key to my scheduler file I am working on.

I have fields named 'Start' and 'Ship'. I need a 3rd field (call it 'Dates') that will do a calc that I cannot figure out....

If I enter 1/1/2001 in 'Start' and 1/5/2001 in 'Ship', I need the 'Dates' field to look like this after the calc:

1/1/2001

1/2/2001

1/3/2001

1/4/2001

1/5/2001

I have written out the script, to figure it out logically, but I'm not sure how to translate it into a FileMaker calc... 'Ship' - 'Start' = 'x', 'Ship' (new line), 'Ship' + 1 ('x' number of times) (new line).

Am I think of this correctly...? Basically, I need to have the 'Start' and 'Ship' - and all dates between entered in a 3rd field.

Any help would be great. Thanks!

Jerremy

Link to comment
Share on other sites

The easiest way to do this will be with a script. Although it's possible to do with a calculation, you have to have an upper limit on the difference between the days. I once built a calculation to do just this for an upper limit of three years between the dates and it actually took three fields because the calc was so long that one field couldn't hold it. The calc went like this:

Start &

Case( Ship >= Start + 1, DateToText( Start + 1 ) & "

Link to comment
Share on other sites

Hello again all...

Thanks for you help. That calc was perfect! I have this calc field related to a calendar file, and now all my dates show up on the calendar just like I wanted them to. I'm sure the script would also do what I wanted, but I needed this to be 'automatic'.

Thanks again!

Jerremy

Link to comment
Share on other sites

This topic is 8607 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.