Get Example source ABAP code based on a different SAP table
Time Formats The time format is determined by column TIMEFM> in the data base table T005X>>, where hh>, mm>, and ss> stand for hour, minute, and second. One 24-hour format and several 12-hour formats are available: <(>TIMEFM<)>>Time Format> blank24-hour format (default setting) hh:mm:ss> 1>12-hour format (1 to 12) hh:mm:ss AM> and hh:mm:ss PM > 2>12-hour format (1 to 12) hh:mm:ss am> and hh:mm:ss pm> 3>12-hour format (0 to 11) hh:mm:ss AM> and hh:mm:ss PM> 4>12-hour format (0 to 11) hh:mm:ss am> and hh:mm:ss pm>
The 24-hour format follows the ISO-8601 standard.
The 12-hour formats are specific to certain English-speaking countries such as Australia, Canada, New Zealand, and the USA. AM/am> stands for Ante meridiem> (before noon>) and PM/pm> stands for Post meridiem> (after noon>).
The formats for the values 1> and 2> or 3> and 4 > differ only in the capitalization of AM/PM> and am/pm>.
For the 12-hour formats of values 1> and 2>, midnight and noon are formatted as 12:00:00.
For the 12-hour formats of values 3> and 2>, midnight and noon are formatted as 00:00:00. The setting for the time format also affects the formatting of time stamps in time stamp fields>.
Latest notes:
All time formats are suitable for the representation of times. Only the 24-hour format is suitable for the representation of a duration, that is, the interval between two points in time. It does not make sense to use AM/am> and PM/pm> for a duration.
The class CL_ABAP_TIMEFM>> contains a helper method for handling time formats.
The values for TIMEFM> are defined by the fixed values of domain XUTIMEFM>>. ABAP_HINT_END
Example ABAP Coding
Output of a time and time stamps with different time formats (if they exist in the database table T005X>). ABEXA 01349 ABAP_EXAMPLE_END
ABAP_EXAMPLES_ABEXA
String Templates, Time Formats>
String Templates, Time Stamp Templates> ABAP_EXAMPLE_END