I am trying to get the month in a date string, the string comes in from an API as a text value "20250616". I was able to successfully get the year by using substring (0, 4). However when I try substring (4, 2) to get the month, the result comes out as empty.
How can I get 2 characters in the middle of a string?