Date format of milliseconds shows SSS only
I'm trying to get the current time including milliseconds, but it only shows SSS.
Here is my code:
import android.text.format.DateFormat
import java.util.Calendar
...
String.format(
"%s IOException: %s",
DateFormat.format("HH
mmss.SSS", Calendar.getInstance().time),
ex.message
)
It outputs 20
4103.SSS some other text. Also tried just toasting the date, same output.