Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Calculating time

Avatar

Level 2

Hello,

I need some help in Adobe Livecycle for calculating time, e.g, 2 fields-- time in (hh:mm) and time out (hh:mm) and total hours.  Also, is it possible to have the time options in 10 minute increments?   I am not a pro at this application and working my way through setting up internal forms and could certainly  use some help.  Thank you!

 

1 Reply

Avatar

Level 10

To get the total number of hours between your two field you can use, this FormCalc in the calculate event of your hours field.

 

(Time2Num(TimeField2.formattedValue, "HH:MM") - Time2Num(TimeField1.formattedValue, "HH:MM")) / (60 * 60 * 1000)

 

If you want 10 minute increments you might be better off with a couple of dropdowns to choose hours/minutes or maybe something like this timepicker with up/down 'spinner' arrows.