Skip to Content

urgent requirement

Hi friends,

I stuck into one program where i have to roundoff seconds(time) into minutes.

Please help me.

Regards

Pooja.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 06:40 AM

    Hi Pooja,

    Min = Sec / 60.

    Result = ROUND( MIN ).

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 06:41 AM

    Hi POOJA,

    IF W_TIME IS THE VARIABLE WHICH HOLDS UR TIME VALUE..

    W_TIME = 12:13:60.

    THEN ..

    IF W_TIME+6(2) GE C_60.

    W_TIME4(2) = W_TIME4(2) + 1.

    ENDIF.

    regards,

    Kaveri

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 06:41 AM

    Hi,

    Refer this

    DATA: X TYPE P DECIMALS 2 VALUE '12493.97'.

    WRITE: /X ROUND -2, "output: 1,249,397.00

    /X ROUND 0, "output: 12,493.97

    /X ROUND 2, "output: 124.94

    /X ROUND 5, "output: 0.12

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 06:42 AM

    minutes = seconds / 60.

    mround = seconds mod 60.

    if mround > 30.

    add 1 to minutes.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 06:48 AM

    Hi Pooja,

    Parameters p_sec type i.

    Data: w_sec type i,

    w_min type i.

    w_min = p_sec / 60.

    w_sec = p_sec % 60.

    if w_sec > 30.

    w_min = w_min + 1.

    endif.

    write: w_min,

    'mins'.

    Reward if help,

    Mahi.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.