• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I need to calculate hours worked for a single day - timesheet

Explorer ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Hello

 

I am needing a script to calculate the hours worked for a single day. The only scripts I have been able to find in the community include dates.  I have tried modifying those scripts but have not had any luck.

 

The employee will clock in when they arrive to work. They will clock out for lunch. Then clock back in when they return from lunch, and finally clock out when they leave for the day. The clock in times will be in “h:mm tt” format. They hours worked will display to the right and total hours will display at the bottom.

 

I am providing a screen shot with dummy text to display exactly what I need.


Hourse-Worked-1, Hours -Worked-2 and  TOTAL have a custom script format of:

event.value = util.printf("%,001.2f", event.value / 60);

Can anyone help?

timesheet-shot.png

 

 

TOPICS
How to , JavaScript , PDF forms

Views

8.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 26, 2021 Apr 26, 2021

In that case,just use "value is the" in 'total' field and pick fields you want to sum and go to hoursWorked field->format tab and copy code from there and input it into same place in 'total' field and see if that helps.

Votes

Translate

Translate
New Here ,
Mar 11, 2024 Mar 11, 2024

Copy link to clipboard

Copied

Hi Nesa, I am trying to work out the same also for timesheets, I am completely new to the coding to trying to follow along what has worked, the link you have is no longer active, any chance if you see this if you can re-link ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 12, 2024 Mar 12, 2024

Copy link to clipboard

Copied

LATEST

Describe what you try to do and share your file if you can.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines