'Change string to date in Rstudio not working for me :-(

I am working on a string that looks like this: 2021-04-16T07:37:13.670549 and have tried using as.Date(x, format="%Y-%m-%d %H:%M:%S",tz="UTC") in R but its not working. Can someone tell me what i am doing wrong? Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source