Get Example source ABAP code based on a different SAP table
VX_EXA_ONLY
Convert Time Stamps in Packed Numbers This example demonstrates the statements CONVERT TIME STAMP>> and CONVERT INTO TIME STAMP>>.
ABAP_SOURCE_CODE ABAP_EXEC >
ABAP_DESCRIPTION The program is given a date, a time, and a time zone and converts this information into a time stamp in a time stamp in a packed number>. The program can also include daylight saving time in its calculations. The resulting time stamp is then converted to the local date and local time of another time zone. The following table shows some possible combinations of input and output, where spc > stands for a space and -> for no input or output. date1>time1>tz1>dst1>ts>tz2 >date2>time2>dst2>sy-subrc> 16.07.2010>9:10:00 AM>CET>-> 2010-07-16T07:10:00>CET>16.07.2010>9:10:00 AM> X>-> 16.07.2010>9:10:00 AM>CET>X> 2010-07-16T07:10:00>CET>16.07.2010>9:10:00 AM> X>-> 16.07.2010>9:10:00 AM>CET>spc>-> CET>-> ->->12> 16.12.2010>9:10:00 AM>CET>spc> 2010-12-16T08:10:00>CET>16.12.2010>9:10:00 AM> ->-> 16.12.2010>9:10:00 AM>CET>X>-> CET>->->->12> 16.12.2010>9:10:00 AM>AUSTAS>-> 2010-12-15T22:10:00>AUSTAS>16.12.2010> 9:10:00 AM>X>-> The third and fifth lines demonstrate that invalid daylight saving time specifications produce the value 12 in sy-subrc>.