Calculating time

Avatar

Avatar
Validate 1
Level 1
Me13
Level 1

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
Me13
Level 1

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Me13
Level 1

09-04-2020

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!

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

12-04-2020

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.