Excerpt | ||
---|---|---|
| ||
substring(string, startPosition, endPosition) Returns a portion of the supplied string between specified character positions. |
Function: substring()
Returns a portion of the supplied string between specified character positions.
Syntax
substring(string, startPosition, endPosition)
Argument | Type | Description |
---|---|---|
string | String | The string to be processed. |
startPosition | Integer | The character position to start the substring from. |
endPosition | Integer | The character position to end the substring at. If not specified, the substring will default to the end of the string. |
Examples
substring("01223236023",6,9)
...
The first, string portion of the file name is variable so we search for the "_" character with the function indexOf, and use the returned value in substring to pull out the date from the file name.