# Time Calculation

New Here ,
May 27, 2018 May 27, 2018

Copied

Good Afternoon All Professional,

the calculation of Total Hrs as below "3rd screenshot"

what i want is as below:-

3.15 change to 3.25

2.45 change to 2.75

5.30 change to 5.50

the actual calculation is

9:15pm = 21:15 hrs = 1260min + 15min = 1275min

6:00pm = 18:00 hrs = 1080 min

1275min - 1080min = 195 min

195 / 60 = 3.25

do any can give me a code to solve it?

Many thanks for all of you.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

187

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
12 Replies 12
Most Valuable Participant ,
May 28, 2018 May 28, 2018

Copied

So you have a code that calculates the time difference but the result is in decimals (3.25) and you want to convert it to a time notation (3:15)?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
May 28, 2018 May 28, 2018

Copied

i want

3.15 to 3.25

3.30 to 3.50

3.45 to 3.75

is it possible to do in javascript?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
May 28, 2018 May 28, 2018

Copied

I see... Can you post your original code?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
May 28, 2018 May 28, 2018

Copied

my code is only use

(ToSUN-FromSUN)+(ToSUN_2-FromSUN_2)

at Simplified field notation:

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
May 28, 2018 May 28, 2018

Copied

That code won't work with time fields in the format you've shown.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
May 28, 2018 May 28, 2018

Copied

for me it can work, but the only thing is need to change as i mention just now.

or how can i send attach the pdf file for you o refer?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
May 28, 2018 May 28, 2018

Copied

Yes, please share the file via Dropbox, Google Drive, Adobe Cloud, etc. You can also email it to me directly (try6767 at gmail.com), if you wish.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
May 28, 2018 May 28, 2018

Copied

Have send many thanks for help

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
May 30, 2018 May 30, 2018

Copied

Morning try67,

have any solution after receive my PDF files?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
May 30, 2018 May 30, 2018

Copied

Yes, and I replied by email.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
LEGEND ,
May 28, 2018 May 28, 2018

Copied

If you want the elapsed time in decimal hours rather than hours and minutes, you would need to enter the time in decimal hours and not hours and minutes.

Do not forget that in some areas of the world there is a change to and from Day Light Savings time and back to Standard time, and if the time interval being measured includes the time change event one hour is lost in the spring and one hour is added in the fall. This also means you need to account for the date for which the time interval is being computed.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
May 30, 2018 May 30, 2018

Copied

i cannot use time in decimal, because my use need to use hours and minutes, the only thing i can imagination is use split hour and minute command, then formula is (hrs * 60) + min

but i can found any code can use in adobe. I'm new in java coding.

Likes

Report

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