If you are looking for a way to make your char array a C string, you should just add dta[len] = '\0'; after your while loop.
You’d have to do this anyway, even for the next step.
If youn want a String object, than you just need to assign the char array to your String object like this myStringObj = dta;.
In addition you have to make sure, that your while() {} never fills more than 19 characters into your char array, since you need to leave space for the zero-terminator.
Your error message gives you the clue already.
The assign operator = for the String object expects a different type to what you (or I in this case ) supplied. But since both types are compatible you just need to type cast it like this