Conversion Table for Source Field Type d

Target Conversion
c Content is handled in the same way as a source field of type c.
d The content of the source field is transferred unconverted.
f If the source field contains a valid date in the format YYYYMMDD, this is used to calculate the number of days since 01.01.0001, and this value is then converted to the internal representation of a floating point number. If the source field contains an invalid date, the target field receives the value 0.
i, b, s If the source field contains a valid date in the format YYYYMMDD, this is used to calculate the number of days since 01.01.0001, and this number is converted to the internal representation of an integer. If the source field contains an invalid date, the target field receives the value 0. If the value range for the data types b and s is not sufficient, this leads to an untreatable exception.
n The characters of the source field are transferred left-aligned into the target field. Trailing blanks from the source field are copied. If the target field is longer than the source field, the field is filled from the right with "0" characters. If the target field is shorter, the values are cut off from the right.
p If the source field contains a valid date in the format YYYYMMDD, the number of days between this date and 01.01.0001 is calculated and this value is converted to the internal representation of a packed number. If the value range of the target field is too small, this leads to an untreatable exception. If the source field contains an invalied value, the target field receives the value 0.
string Content is handled in the same way as a source field of type c.
t Not supported. This leads to a syntax error or an untreatable exception.
x The content of the source field is first converted to the data type i (see above), and then to the type x (see conversion table for source field type i, b, or s).
xstring The content of the source field is first converted to the data type i (see above), and then to the type xstring (see conversion table for source field type i, b, or s).

Note

The conversion rules are designed so that data objects of type d exhibit character-type behavior when assigned to character-type data objects, and numeric behavior when assigned to numeric data objects. The latter is the basis for date calculations in arithmetic expressions. Only date entires in the format YYYYMMDD are valid data for data objects of type d. The conversion rules, however, allow the assignment of date fields that contain invalid data. The latter is not recommended.