Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Calculating a date before a date


iankh
 Share

Recommended Posts

I'm probably struggling with something that seems like it should be fairly simply because I'm a newbie and non-technical user to boot, but how do I calculate a date before a date?

 

Here's what I'm trying to do.

 

The user inputs a date they want to make a booking. They have the ability to book at a 7 month window before the desired check-in date or an 11 month window before the desired check-in date.

 

So, if the check-in date is 10/5/2007 they can book at either 11/5/2006 or 3/5/2006. How would I calculate these dates? Thanks!

Link to comment
Share on other sites

Try:

 

Date ( Month (CheckInDate) - x ; Day (CheckInDate) ; Year (CheckInDate) )

 

where x is either 7 or 11 (or whatever).

 

Note that month calculations are always problematic, due to their varying lengths. Filemaker counts the same number of days from the beginning of the month as in the original date. For example, if your CheckInDate is September 30, 2006, the date 7 months earlier is calculated as March 2 (the 30th day of February).

Link to comment
Share on other sites

Try:

 

Date ( Month (CheckInDate) - x ; Day (CheckInDate) ; Year (CheckInDate) )

 

where x is either 7 or 11 (or whatever).

 

Note that month calculations are always problematic, due to their varying lengths. Filemaker counts the same number of days from the beginning of the month as in the original date. For example, if your CheckInDate is September 30, 2006, the date 7 months earlier is calculated as March 2 (the 30th day of February).

 

Comment - Thanks! You are a life saver! That did the trick. I keep realizing how much I have left to learn.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use