# Weeknum, changing pay period start day

**URL:** <https://community.glideapps.com/t/weeknum-changing-pay-period-start-day/39833>\
**Category:** Ask for Help\
**Created:** [March 18, 2022, 10:55pm UTC](https://community.glideapps.com/t/weeknum-changing-pay-period-start-day/39833 "2022-03-18T22:55:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Burdine\_Jr](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_burdine_jr/32/9776_2.png) [@John\_Burdine\_Jr](https://community.glideapps.com/u/John_Burdine_Jr)\
**Post date:** [March 18, 2022, 10:55pm UTC](https://community.glideapps.com/t/weeknum-changing-pay-period-start-day/39833/1 "2022-03-18T22:55:07Z")

</div>

@Robert_Petitto

Trying to change the start of the pay period from Sunday to Monday.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 19, 2022, 1:14am UTC](https://community.glideapps.com/t/weeknum-changing-pay-period-start-day/39833/2 "2022-03-19T01:14:13Z")

</div>

Yeah, I was bitten by this before thinking WEEKNUM would return a week from Monday to Sunday.

My approach is like this:

**1/Add a column to calculate the weekday number of the timestamp**

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/13052d3e6c12b0f13cc33f129f3541874c62b82f.png)

So Sunday returns 1, Monday returns 2 and so on.

**2/Add a column to calculate the adjustment value**

If the weekday equals 1 (meaning it’s Sunday), return -1. Else return 0.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/2/524b4e6039d1a097580e1024450c0ce8ad92db5f.png)

**3/Modify the existing weekcode formula to add the adjustment value**

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/2/6220614a2ddbb0698c4d30b1d9afc163effe6e53.png)

---

<div class="post-metadata">

**Author:** ![John\_Burdine\_Jr](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_burdine_jr/32/9776_2.png) [@John\_Burdine\_Jr](https://community.glideapps.com/u/John_Burdine_Jr)\
**Post date:** [March 19, 2022, 12:43pm UTC](https://community.glideapps.com/t/weeknum-changing-pay-period-start-day/39833/3 "2022-03-19T12:43:24Z")

</div>

That’s worked well, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [March 20, 2022, 12:43pm UTC](https://community.glideapps.com/t/weeknum-changing-pay-period-start-day/39833/4 "2022-03-20T12:43:59Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
