I am dealing with time strings such as "1030" or "0230"
I am trying:
var time = "1030";
DateFormat.jm().format(DateFormat("hhmm").parse(time));
However that throws the following error:
Unhandled Exception: FormatException: Trying to read mm from 1030 at position 4
What am I doing wrong?
Edit: Nvm, I guess I have to substring the time into "hour:min" and use "hh:mm", then it works. So, convert the time "1030" to "10:30", and then use "hh:mm"..