I am getting date in string like this 2023-01-25T00:37:00.000Z
I try to parse like this DateFormat("dd-MM-y").parse(data.matchScheduleDateTime)
but its showing wrong date and time.
If I try like this dateFormat.parse("2023-01-25T00:37:00.000Z")
its showing format exception
3
Answers
You need to parse it using
DateTime
and convert it usingDateFormat
:You can use
DateFormat
like this: