Application Development 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: 

CONVERT TIME IN HOURS INTO STANDARD TIME.

Former Member
0 Kudos

Hi All,

I have time in standard time format for Ex. 07:00:00 . And I want to add 4 hours and 30 min into that time. That means after adding my output I want like this 11:30:00. That means time is now 11 pass 30 min 00 seconds.......Plz tell how to do this............

Regards.

Pradip Pawar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

it is simple do like this

Report Zrep.

data: time1 type tims value '070000',

time2 type tims value '043000',

time3 type tims.

time3 = time1 + time2.

write 😕 time3.

Regards

Anji

2 REPLIES 2

Former Member
0 Kudos

Hi

it is simple do like this

Report Zrep.

data: time1 type tims value '070000',

time2 type tims value '043000',

time3 type tims.

time3 = time1 + time2.

write 😕 time3.

Regards

Anji

former_member387317
Active Contributor
0 Kudos

Hi Pradip,

you can do it by the way Anji told you.

I didn't try but guess

what will be the result of '<b>21:00:00</b>' and '<b>04:30:00</b>' ?

Declare variable time1 , time2 and time3...

Time1 = '21:00:00'.

Time2 = '04:30:00'

Time3 = Time1 + Time2.

write / Time3 USING EDIT MASK'__:__:__'.

See the output...

For getting solution of this problem...

You should convert the time into SECONDS for both time valuse

Then add those seconds

Then again convert it into HH:MM:SS...

Hope it will help you

Please correct me if i am wrong.

<b>Reward Points if it is helpful.</b>

Thanks & Regards

ilesh 24x7