Answers for "date to minutes in kotlin"

1

kotlin get time milis hour minutes

fun getTimeWithMilis(millis: Long): String {
        val date = Date(millis)

        val formatter = SimpleDateFormat("HH:mm")
        formatter.timeZone = TimeZone.getTimeZone("UTC")

        val formatted = formatter.format(date)
        Log.d("Time : ",formatted)
        return formatted.toString();

    }
Posted by: Guest on October-21-2021

Browse Popular Code Answers by Language