fun String.asTime(): String { val time = Date(this.toLong()) val timeFormat = SimpleDateFormat("HH:mm", Locale.getDefault()) return timeFormat.format(time).trim() //This will convert the BigInteger to long //This will convert the BigInteger to long }