HALBURN Posted February 12, 2008 Posted February 12, 2008 I have a single computer acting as a time clock for all the employees. They simply enter their ID and clock in or out. They are on a two week pay cycle. Currently, I have two calculation fields: > PayStartDate = (this calcuation is simply a date that I manually enter every two weeks) > PayEndDate = (PayStartDate +14) These two fields define the range of days show in the portal that calculates the hours that each employee sees on their virtual time card. How can I automate the "PayStartDate" so I do not have to manually enter it every two weeks?
comment Posted February 12, 2008 Posted February 12, 2008 It can be calculated from the clock date by: 14 * Div ( WorkDate - 1 ; 14 ) + 1 Or, if you are on the "other" two weeks cycle: 14 * Div ( WorkDate + 6 ; 14 ) - 6
HALBURN Posted February 13, 2008 Author Posted February 13, 2008 Sorry, I do not understand your suggestion. Let's say the new pay cycle starts on 02/11/2008 and restarts every two weeks thereafter. How do I get it started and how does it automatically keep updating every two weeks with your calculation?
comment Posted February 13, 2008 Posted February 13, 2008 Maybe I don't understand your situation. I thought you had a bunch of records each with punch in & out date and time. If so, each record can calculate the starting Monday of its pay period using one of the above formulae. If, OTOH, you want to create a new record - in another table - for each pay period, that's another matter. But if you want a date in a field to update itself every 14 days, then I believe you're on the wrong path.
HALBURN Posted February 13, 2008 Author Posted February 13, 2008 I guess that I am too much of a novice to understand your calculation. Somewhere I have to define the start date of the first pay cycle that all subsequent pay cycles will be based on, right? In your calculation what is defining the start date of the perpetual and repeating 14 day cycle?
comment Posted February 13, 2008 Posted February 13, 2008 Somewhere I have to define the start date of the first pay cycle that all subsequent pay cycles will be based on, right? That would be one way to do this - not the only one, though. But if you go this way, then create a table of pay periods, and in this table define a number field named PayPeriodID - with auto-entered serial number starting at 1 and incrementing by 1. Let's say your first pay period starts at Feb 11, 2008. Define a calculation field (result is Date) = 14 * PayPeriodID + 733069 This will return Feb 11, 2008 for the first record, Feb 25, 2008 for the second record, and so on. In your calculation what is defining the start date of the perpetual and repeating 14 day cycle? Nothing, really. As you correctly state, it's perpetual - it has no start. It's only limits are the limits of Filemaker epoch, i.e. from Jan 1, 0001 till Dec 31, 4000.
Newbies A_Simpson Posted November 30, 2010 Newbies Posted November 30, 2010 I'm using the time card template that came with Filemaker Pro 8. Our company pays on the 1st and 15th of every month, and I am trying to figure out how to best adjust the time card (or create a new one) that is based on these pay dates. Since it's not a regular 14 day period, I can't use the solution above. Any suggestions?
comment Posted November 30, 2010 Posted November 30, 2010 Try = Let ( b = Day ( WorkDate ) ≥ 15 ; Date ( Month ( WorkDate ) + b ; Case ( b ; 1 ; 15 ) ; Year ( WorkDate ) ) )
Newbies A_Simpson Posted December 1, 2010 Newbies Posted December 1, 2010 Thanks for the suggestion - I wish I had more experience and understood it better. To which field would I apply this, and how do I define "WorkDate"? many thanks, Adrienne
comment Posted December 1, 2010 Posted December 1, 2010 WorkDate is the input - it is the date on which the work occurred. A calculation field (result is Date) using the above formula will return the 15th of the month for any WorkDate in the first 14 days of the month, and the 1st of the next month for the rest.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now