Function: Substr
Description
Extracts a substring of a specified length and starting position from a string. Note: The position of the substring and its length must be specified.
Syntax
Substr(string,starting position,length)
Arguments
string is the string containing the substring.
starting position specifies the starting position of the substring.
length specifies the length of the substring.
Note: If the number of characters specified is larger than the number of characters available, the substring is extracted to the end of the string.
Return value
This function returns a character string.
Calculated field example
If the Prod_code field contained the value of PZ-123B, the following calculated field expression would return 123: Substr(Prod_code,4,3)
Filter/Find example
Records with a Prod_code field value of TC-789A or RB-789C can be selected or found using the expression: Substr(Prod_code,4,3)="789"
© 2024 Altair Engineering Inc. All Rights Reserved.