SAP DATE FORMATS

Get Example source ABAP code based on a different SAP table
  


ARTICLE

Date Formats
The date format is specified by column DATFM, where 'mm', 'dd', and 'yyyy' stand for day, month, and year. The following country-specific formats are available: DATFMDate 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 values '7', '8', and '9', the first two characters 'gg' of a four-digit year are prepared 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 values 'A' and 'B', the date is prepared according to the Islamic moon calendar, which calculates time starting from 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 respective settings are in database table TISLCAL, and can be changed using program I18N_MAINTAIN_TISLCAL.
The Iranian format for value 'C' is based on an Islamic sun calendar, which calculates in sun years starting from the Hijra.

Example
To see the display of the current date in all possible formats, see the respective example with character string templates.