Jump to content

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

Recommended Posts

Posted

I have a date calculation as follows:

Case(DateInstruction <= TextToDate("30/6/2001") , DateInstruction +30, DateInstruction >= TextToDate("01/07/2001"), DateInstruction+14)

I need to amend this so that instead of adding 30 days to the dateinstruction, it adds 1 calendar month. i.e if the date is 10/03/2000 the returned date is 09/04/2000 when it should in fact be 10/04/2000.

Problem this causes is if you put something in on say 31/01/2000 the result of 31/02/2000 is obviously incorrect because there's no such date and should therefore become 01 or 02/02/2000. (govt legislators have no idea about logical calculations!)

Understandbly I have a headache and figure that the users can get over it and enter the date in manually! But thought I would ask the question anyway.

P.S I'm in Australia so for everyone else 31/02/2000 in your language is 02/31/2000 cheers grin.gif

Posted

Use this:

Date(Month(DateInstruction)+1,Day(DateInstruction),Year(DateInstruction))

Filemaker will automatically adjust month 13 to January of the following year.

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