Skip to main content
Participating Frequently
June 30, 2022
Question

Script for Auto-populating dates every two weeks

  • June 30, 2022
  • 1 reply
  • 846 views

Hello. I am trying to build script for auto-populating dates on a pay period planning tool. The goal is for the user to enter the start of the pay period on the first start date column and then to have the rest of the dates autopopulate every two weeks through the remainder of the pay periods. Below is a snapshot of what it looks like and the first two periods manually filled out. In this case the first pay period started 6/19 through 7/2, the next starts 7/3-7/16, the next would be 7/17-7/30 and so own. Anyone able to help with the script on this?

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
July 1, 2022

So you want the user to enter the Start date and have the End date automatically calculated as 14 days after it, basically?

Participating Frequently
July 5, 2022

Yes, and then on the next start date it needs to add 1 day, and then go out another 14 days and so on. Like the example image above. 6/19 + 14 days ends 7/2. +1 day for the next start date to begin 7/3 and then another 14days. Hope that makes sense. The point is to make it so the dates can adjust for two week pay periods over the course of a year but start based on whatever the first start of the pay period is entered, in the example, that is 6/19. 

try67
Community Expert
Community Expert
July 6, 2022

What are the names of the fields involved?