You are viewing limited content. For full access, please sign in.

Question

Question

Time Field Table Calculations for Hours Worked (Timesheet Process)

asked on September 12, 2017

Hello,

 

I am trying to create a timesheet process one of the things I need is to calculate time fields to get the hours worked on each day for the rows. It does not seem the SUB or HOUR are working with indexed time fields in a table.

 

Please advise if this is still a feature that does not work on time fields or if there are any other options.

 

Thanks

0 0

Replies

replied on September 12, 2017

Armando,

Following Xiuhong Xiang example at https://answers.laserfiche.com/questions/101287/Time-calculation-in-forms you can get your desired results in Forms 10.

The only difference would be the formula, since you are using a Table, it would look something like this.

=(INDEX(TableTimes.TableTime2,ROW())-INDEX(TableTimes.TableTime1,ROW()))

Where "TableTimes" is the variable name of the table, "TablesTimes2" is the variable name of the End Time, and "TableTime1" is the variable name of the Start Time.

The Total Time field is the one that will have the formula.

In Xiuhong's example she set the Default value to all be the same Date and Time like: 2000-01-01 12:00:00 AM for all fields and also set the CSS field to showonlytime for all fields

and the Show Time checkbox is checked for all of them.

Then Xiuhong set this in CSS: .showonlytime .cf-date-field-date{display:none}

You might want to hide the last AM/PM drop-down menu too.

Hope that helps.

 

Thank you,

Raul Gonzalez

Table.PNG
TimeDiff.PNG
allFields.PNG
CSS.PNG
Result.PNG
Table.PNG (22.59 KB)
TimeDiff.PNG (16.61 KB)
allFields.PNG (27.19 KB)
CSS.PNG (10.04 KB)
Result.PNG (6.52 KB)
1 0
replied on June 12, 2019 Show version history

Raul,

I am having some trouble getting the calculation to work.

I entered the formula exactly how you have described it but it will not calculate it. Won't give me an error message either.

Not sure if I'm missing something.

End Time:

Start Time:

Total Hours:

0 0
replied on July 3, 2019

Hi Rex,

Did you ever get this figured out?

I am trying to do the same thing and it doesn't calculate.  I am getting an error when I click Done with the Table.

Thank you,

Manny

0 0
replied on July 5, 2019

Manuel, I was not able to get this to work correctly.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.