Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Program Parameters →  Language Environment →  Formatting Settings →  Country-Specific Formats 

Time Formats

The time format is specified by column TIMEFM, 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
0 24-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 standard ISO-8601.
  • The 12-hour formats are specific for specific 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 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 displayed as 12:00:00.
  • For the 12-hour formats of values "3" and "2", midnight and noon are displayed as 00:00:00.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • All time formats are suitable for the display of times. Only the 24-hour format is suitable for the display of a period of time, that is, the duration between two points in time. It does not make sense to display AM/am and PM/pm for a period of time.

  • The class CL_ABAP_TIMEFM contains a helper method for dealing with time formats.

Example

To see the display of various times of day in all possible times, see the respective example with character string templates.