When creating simple calculations for characteristics, the way a field is displayed internally can be different to the visible external display.
Note the following cases:
The selected field is a date field. The internal display is as follows: YYYYMMDD for the full date, YYYYMM for just year/month.
External display: 02.03.2006 - internal display: 20060302
External display: 04/2010 - internal display: 201004
The selected field is a character string with numeric characters only (0123456789). The internal display is subject to an alpha conversion (fill with 0) up to a certain character length. If the field contains just characters or a mixture of characters and numeric characters, there is no difference between the internal display and the external one. More information: http://sathya-sapbw.blogspot.com/2007/10/faq-alpha-conversion.html
External display: 17485 - internal display: 00017485 with a length of 8
External display: 234 - internal display: 234 with a length of 3
Characteristics are always calculated based on how the field is displayed internally. The following examples show you how to proceed when calculating characteristics:
To extract a month from a date field, you need the following parameters: MIDSTR( date field, 5, 2).
To extract the two digits before the last one from a numeric field (123) with alpha conversion of length 8, you need the following parameters: MIDSTR( numeric_field, 6, 2).
Cutting the month from calendar day: Internal display of the calendar day: 20100416, desired result: 04. From the fifth place, you need to cut out with length 2. The following parameters are required for this: MIDSTR (5, 2).