Need help with two errors

The sub string from 0 to 4 has 5 characters. You can't put that into a single character. Maybe you want to add the .toint() method to convert to an integer?

While months and days will fit into chars (bytes), years won't. Choose a bigger integer type.