Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Duration Math

sap_cohort
Active Contributor
0 Likes
764

Hi, I am having users maintain a time threshold limit in a time field. HH:MM:SS. So for 1 hour 10 minutes they would enter 011000. Now, I have 2 time stamps and I need to know if the timestamp difference is greater than the threshold value of 1 hour and 10 minutes. Not sure the best way to do this. Note: For some reason when I output my time field of 011000 it shows up as 03:03:20?

Should I not have them maintain the threshold as HHMMSS?

Thanks for any help!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
727

It outputs 03:03:20 due to the fact that it considers it to be 11000 seconds...if you wish to output it just

WRITE lthreshold using edit mask '__:__:__'.

As for calculation, when you calculate the difference between the two time stamps the output might be in seconds and in that case you would need to convert the above to seconds and compare.

5 REPLIES 5
Read only

Former Member
0 Likes
728

It outputs 03:03:20 due to the fact that it considers it to be 11000 seconds...if you wish to output it just

WRITE lthreshold using edit mask '__:__:__'.

As for calculation, when you calculate the difference between the two time stamps the output might be in seconds and in that case you would need to convert the above to seconds and compare.

Read only

0 Likes
727

Hi, not sure I understand this well enough. Can you explain what the difference between the following is?

The Write Statement outputs them differently.

TIME1 = '011000'.

TIME2 = 011000.

Thanks!

Read only

0 Likes
727

Basically in case of TIME2 it is considered to be 11000 seconds and hence it manipulates it to 03:03:02...but in the other case it is a character string and is interpreted as HHMMSS.

Read only

Former Member
0 Likes
727

Hi,

Output depends upon user default setting for time

check usr01 table or

system-user profiles-default data.

to overide default settings we have use

write time using edit mask '::--'

Regards

Amole

Read only

sap_cohort
Active Contributor
0 Likes
727

Question Answered