Solved

End of Month dates

Posted on 2006-10-28
5
393 Views
Last Modified: 2010-04-27
I am trying to calculate the end date of each month using the field Latest_Date. I have tried using the calculation
Date(Month(Latest_Date)-1;Day(Latest_Date);Year(Latest_Date))

However, if Latest_Date is 30th June 2006, the date it will give me is 30th May 2006. What I want is to go back on a calendar month basis so that the returned value would be 31st May 2006, 30th April 2006, etc. Does Filemaker Pro have this date feature? If so how do I go about it?
0
Comment
Question by:c0link
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
lesouef earned 250 total points
ID: 17826331
there is no built-in function for yr pb, but you can achieve it this way:
latest date = 1st day of the current month - 1 day

filemakerwise, this is:

if Ddate is the date to calculate from:
Latest_date = Date ( Month ( Ddate ) ; 1 ; Year ( Ddate ) ) -1

The same way, you can achieve the end of the current month this way:
Latest_date = Date ( Month ( Ddate ) +1 ; 1 ; Year ( Ddate ) ) -1
0
 

Author Comment

by:c0link
ID: 17828789
looks simple enough, let me work it through.
0
 

Author Comment

by:c0link
ID: 18024473
I thought I had accepted the answer. I have no problem with this being credited to lesouef.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question