Why does the following code:
Result in the output (specifically the last line):
And what is the best way to do this instead so as always to get the expected values? asked 08 Feb '13, 16:42 Marius Pieda... |
To understand how this works you probably should check conversion rules for elementary data types. When you add value to variable l_dat it's converted to the number of days since 01.01.0001. In first and 2nd example number is converted back to datum type while you use assignment operator. Try to use MF 'FORMAT DATE 4 OUTPUT'. answered 09 Feb '13, 08:08 Pawel Hixohe... 1
Yup, I also figured this. Just a minor correction. The date is since
(09 Feb '13, 13:53)
Marius Pieda...
According to http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3434358411d1829f0000e829fbfe/content.htm it's from 01.01.0001.
(09 Feb '13, 15:46)
Pawel Hixohe...
yes, the date is specified as from that date as being valid. However, the integer -> date conversion seems to be zero offset on 01.01.0000 thus adding one gives you the first 'valid' date of 01.01.0001
(31 May '13, 08:30)
Marius Pieda...
|