Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Problem with Time Calculation in Timesheet

Avatar

Level 1

Hello,

I am new to Adobe live cycle and I am having a problem populating the timesheet I put together.

Basically, it is a timesheet showing time in and time out (In 9:00 AM out 11:30 AM)  and that should format to a number such as 2.5 hours.

I used the formula given in one of the other forums and it shows a number 0 in the column, but not the number it should. What am I missing?

I also need it to add the final column at the bottom of the total hours for the week.

Can someone please help me? The current formula I used is

// compute elapsed time

var elapsed = (Time2Num('H:MM A") - Time2Num("H:MM A")) / (1000*60)

// compute whole hours, format as string and trim leading spaces

var Hrs = Ltrim(Str(Floor(elapsed / 60)))

// compute remainder minutes, convert to string, remove leading blanks, // pad leading zero, make string 2 character long

var Mins = Right(Concat("0",Ltrim(Str(Mod(elapsed, 60)))), 2)

// create formatted display string

Concat (Hrs, ":" Mins)

0 Replies