1 Reply Latest reply on Apr 25, 2016 7:31 AM by gkaiseril

    Javascript on paroll sheet


      I am attempting to develop a more automated payroll time sheet.


      To define the Pay Period I have 2 cells titles START and END. Each is a date format showing the start and end of the pay period.


      I then have a form for week 1. Column 1 has the days of the week from Sunday to Saturday in 7 rows. Column 2 is the actual date for that day, Column 3 is the start time in hours and minutes (always on the 1/4 hour) a sample of a cell name is StartHrMinSunday. Column 4 is the end time and a sample cell name is EndHrMinSunday. Column 5 is notes and column 6 is total hours. This is the difference between column 3 and column 4 and a sample cell name is TotalHoursSunday.


      I would like the dates in column 2 to automatically fill in by adding to the START date cell. Column 3 and 4 will be manually filled in in either 12 or 24 hour format, eg 1:00 pm or 1300. Column 5 is manually completed. Column 6 would be calculated from the data in the different cells of column 3 and 4.


      I am very new to javescript in acrobat and have not a clue how to start this process. All help is much appreciated.


      Maurice Perrault

        • 1. Re: Javascript on paroll sheet
          gkaiseril MVP & Adobe Community Professional

          You are asking the volumes here to do all the hard work of providing you  all the scripts except summing the time worked.


          Have you looked for solutions on the Web?


          For a project like this with so many repeated blocks of code, I write functions to do things like convert date strings into JavaScript date objects, compute the difference in date objects, convert the minutes worked into formatted hours and minutes.