Ansicht
Dokumentation

ABENDATE_FORMATS - DATE FORMATS

ABENDATE_FORMATS - DATE FORMATS

Fill RESBD Structure from EBP Component Structure   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Date Formats

The date format is determined by column DATFM in the database table T005X, where "mm", "dd", and "yyyy" stand for day, month, and year. The following country-specific formats are available:

DATFM Date Format
"1" dd.mm.yyyy
"2" mm/dd/yyyy
"3" mm-dd-yyyy
"4" yyyy.mm.dd
"5" yyyy/mm/dd
"6" yyyy-mm-dd
"7" ggyy.mm.dd, Japanese date
"8" ggyy/mm/dd, Japanese date
"9" ggyy-mm-dd, Japanese date
"A" yyyy/mm/dd, Islamic date 1
"B" yyyy/mm/dd, Islamic date 2
"C" yyyy/mm/dd, Iranian date

  • In the Japanese formats for the values "7", "8", and "9", the first two characters "gg" of a four-digit year are formatted as a Japanese Unicode character for the current Japanese Emperor. The last two characters "yy" signify the year of his reign.
  • In the Islamic formats for the values "A" and "B", the date is formatted according to the Islamic moon calendar, which calculates time since 16th July 622, which is the date on which Mohammed left Mecca (Hijra). Since this calculation can be different in different Islamic countries, two formats are offered, each of which can be set individually. The corresponding settings are in the database table TISLCAL, and can be changed using the program I18N_MAINTAIN_TISLCAL.
  • The Iranian format for value "C" is based on an Islamic sun calendar, which calculates the time in sun years since the Hijra.

The setting for the date format also affects the formatting of time stamps in time stamp fields.

Notes

  • The class CL_ABAP_DATFM contains helper methods for dealing with date formats.
  • The values for DATFM are defined by the fixed values of domain XUDATFM.

Example

Output of a date and time stamps with different date formats.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 4882 Date: 20240419 Time: 002810     sap01-206 ( 45 ms )