I have this time 20220312T153020
from a json and I want to convert it to:
2022-03-12 15:30
I tried this code, but I'm getting an exception.
val fecha = "20220312T153020".replace("T","")
val formattedDate = SimpleDateFormat("yyyyMMDDHHmmss").format(fecha)
Log.d("fecha", formattedDate)
Is possible transform that timestamp to human date? I'm trying kotlin code.
thanks so much.