Forum Discussion
Hey Ivan,
Here is a link to the Quickbase formula functions I recommend adding to your bookmarks: https://login.quickbase.com/db/6ewwzuuj?a=td
There is a function that perfectly addresses what you are looking for called LastDayOfPeriod().
I haven't personally used this function, but if I'm understanding it correctly, you will put Today() as your [Date Field], Weeks(2), as your period, and then you will establish a date as your anchor for the periods moving forward. Seeing as today, 2/24/2023 is a payday, the anchor would be (2023,2,11). So your formula would look something like this: LastDayOfPeriod(Today(),Weeks(2),(2023,2,11))
Hope this helps!
------------------------------
Curtis Middleton
------------------------------
I was looking at that function thinking that would be it. However, that works this week. How do I dynamically "shift it" every 2 weeks? So right now the anchor is 2003,2,11. Next Pay cycle that needs to shift to 2023,2,25
How do I keep it moving based on where I am?
------------------------------
Ivan Weiss
------------------------------
- MarkShnier__You3 years ago
Qrew Legend
np, use this function for FirstDayOfPeriod
https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=43
The last day of the period will be 13 days later.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- IvanWeiss3 years agoQrew Captain
Mark, but it would not always be 13 days later. Depends which week I am in.
------------------------------
Ivan Weiss
------------------------------- MarkShnier__You3 years ago
Qrew Legend
The last day of the payroll period is always 13 days after the first day of the payroll period.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- DonLarson3 years agoQrew Elite
Ivan,
This is a common problem. I build a Pay Roll Periods table . That way I have not just the start date and end date but when the calculations were done to send to the Pay Roll company.
------------------------------
Don Larson
------------------------------- IvanWeiss3 years agoQrew Captain
Don, so what do you do with this table? How do you get it to keep track of the next payroll cycle? Is it simply a single record with the last payroll and the next payroll being two weeks later? How do you update the first field? Maybe via pipeline?
Thanks!
------------------------------
Ivan Weiss
------------------------------
- MarkShnier__You3 years ago
Qrew Legend
Please read the documentation in the link. That is the correct function for you to use. The date you seed into the function is just any example of the first day of your period. Try entering a date in the past.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------