Jump to content
Server Maintenance This Week. ×

Total N00b needs help with dates


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

Recommended Posts

Please excuse the ignorance on my part but I am a total n00b as far as FM and databases are concerned.

I have just created a flatfile database which contains data on clients [Contact data etc,] and also membership and contract records [licence No.s and Contract refs together with the associated inception and expiry dates.]

My question is this: If I enter a date in one field, can I apply a calculation on it amounting to a fixed period of time [such as eg. xx/xx/xxxx plus 4 weeks or xx/xx/xxxx plus 12 months] and then have the results appear in another field?

I have managed to get a few other more simple calculations to behave like this with basic numbers, but I am at a loss as to what caluculation fucntion to apply in this instance as dates are involved.

Any help would be most appreciated.

Link to comment
Share on other sites

See FMP Help > Functions reference > Date functions.

Thanks for the prompt response however, having already viewed that section of the Help section, it made little sense apart from litsting the functions available to me. My problem lies in knowing HOW to apply the functions. As I explained in my opening post, I am totally new to Filemaker and databases in general other than using Excel at a fundamental level which is a different logicset.

I understand the functions listed perform an action on the data contained within the field, [at least I think thats what it means!], but I still cannot understand how those functions will allow me to apply the calculation I am trying to achieve.

The specific issue is that I have 2 fields: Start of Free Period Date and End of Free Period Date, where the free period is 4 weeks duration. I enter a date in the first field and the calculation then computes the date in the second field. Only trouble is, I dont know which calculation to use!!!

HELP!

Link to comment
Share on other sites

My Help appears to be better than yours - it has examples, some of them nearly identical to your questions.

Anyway:

To add exactly 4 weeks, i.e. 28 days:

End of Free Period Date =


Start of Free Period Date + 28

 

To add 1 month:

End of Free Period Date = 

Date ( 

Month ( Start of Free Period ) + 1 ; 

Day ( Start of Free Period ) ; 

Year ( Start of Free Period ) 

)

 

To add 1 year:

End of Free Period Date = 

Date ( 

Month ( Start of Free Period ) ; 

Day ( Start of Free Period ) ; 

Year ( Start of Free Period ) + 1

)

Hopefully that makes the pattern clear. Remember to set the calculation result to date.

Link to comment
Share on other sites

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