Jump to content

Date Calc: Find nearest date in future


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

Recommended Posts

Hi there

I´m pretty new to filemaker and I´m searching for a date function that will display the nearest date compared to the current system date ?

I have a few date fields (date 1 ... date 50). Now the calculation date field should show me which of the date fields is coming up first and closest to the current date ?

Is there a function for that?

Thanks a lot,

fraank

Link to comment
Share on other sites

As I said, that's not a good method in general. I am not sure what this is about, but usually you would have 50 (or rather any number of) related records in another table. For example, a table of Projects and a table of Milestones, related by ProjectID. Then you can get the upcoming milestone by defining another relationship as:

Projects::ProjectID = Milestones 2::ProjectID

AND

Projects::cToday < Milestones 2::Date

where cToday is an unstored calculation = Get(Currentdate). By sorting the related milestones by Date, ascending, the first related record will be the upcoming milestone.

Link to comment
Share on other sites

This topic is 4395 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
 Share

×
×
  • Create New...

Important Information

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