I recently created a database made for keeping track of timecards of employees. The Pay Periods rotate each month, so Pay Period goes from Sunday to Saturday (October 16–October 29), (October 30–November 12), (November 13–November 26), (November 27–December 10), etc. The pattern stays the same, but is there a way to automatically generate the Start/End date of the Pay Period, and automatically tell which Day belongs in which Pay Period. So, for example, I write a script that will get a list of all days worked in any given pay period (worked Monday–Friday and Monday–Friday in the October 30–November 12 period), to determine the amount of hours (70), then send this as a PDF to the accountant. Is there a way that FileMaker can tell which dates belong to which pay periods, the pay periods being auto-generated by a calculation?
All you need do is add 14 to the start date of the previous pay period to get the start date of the next period. Add 13 to that to get the end date of that new pay period.
Dates in date fields store their values as an integer representing the number of days from 12/31/0 to the present so adding or subtracting an integer computes a new date by that number of days.