Skip to Content
author's profile photo Former Member
Former Member

Time conversion from 24hr format to 12hr format

Hi,

Do any one come across a function module which takes system time as input and outputs time in 12 hr format.

example input = 13

output = 1 pm

Early response is appreciated.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Nov 22, 2005 at 08:03 AM

    Hi Syed,

    Why do you need a function to make that ?

    if w_date gt 12.
      w_date2 = w_date - 12.
      w_type  = 'pm'.
    else
      w_date2 = w_date.
      w_type  = 'am'.
    endif.

    Rgd

    Frédéric

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 22, 2005 at 08:15 AM

    Hi Use this FM

    HRVE_CONVERT_TIME

    in that you need to specify

    TYPE_TIME 'A'

    INPUT TIME

    INPUT_AM_PM 'AM' or 'PM'

    Try

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 22, 2005 at 08:16 AM

    Hi Syed,

    TYPE_TIME A

    INPUT_TIME 13:00:00

    INPUT_AM_PM AM

    Export parameters Value

    OUTPUT_TIME 01:00:00

    OUTPUT_AM_PM PM

    Regards

    vijay

    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.