Start of Content Area

Background documentation 12-Hour Time Format  Locate the document in its SAP Library structure

The 12-hour time format is supported for the development of Web Dynpro ABAP applications. This makes it possible to use the am/pm designations that are usual in English-speaking countries. For more information on the 12-hour time format, see Time Format in the ABAP keyword documentation (transaction ABAPHELP) in the system.

Prerequisites

You can define the desired time format for your user in your user data.

...

       1.      Choose System User Profile Own Data.

       2.      Go to the Defaults tab page.

       3.      In the field for setting the time format, select the required option from the following entries:

       24-hour format (example:12:05:10)

       12-hour format (example: 12:05:10 PM)

       12-hour format (example: 12:05:10 pm)

       Hours from 0 to 11 (example: 00:05:10 PM)

       Hours from 0 to 11 (example: 00:05:10 pm)

       4.      Save your entry.

Features

The following formats are used depending on the default values for the user:

Formats

24-hour format

12-hour format (1-12)

12-hour format (0-11)

00:00:00

12:00:00 AM

00:00:00 AM

00:00:01

12:00:01 AM

00:00:01 AM

00:59:59

12:59:59 AM

00:59:59 AM

01:00:00

01:00:00 AM

01:00:00 AM

11:59:59

11:59:59 AM

11:59:59 AM

12:00:00

12:00:00 PM

00:00:00 PM

12:59:59

12:59:59 PM

00:59:59 PM

13:00:00

01:00:00 PM

01:00:00 PM

23:59:59

11:59:59 PM

11:59:59 PM

24:00:00

24:00:00 PM

24:00:00 PM

The table contains entries for three of the five supported formats; the other two formats differ only in that they use am and pm instead of AM and PM.  

Note

An InputField that is bound to an attribute of ABAP type T is always rendered wide enough for its content to be legible in its entirety in all time formats. For this reason, the length property is ignored if its value is too small.

Example

There are examples of the different time formats in the system in the WDR_TEST_INPUT and WDR_TEST_OUTPUT components. Make sure that you make the settings described in Prerequisites.

 

 

End of Content Area