time text format kotlin android studio code example
Example 1: time text format kotlin android studio
val currentTime: String = SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(Date())
//for time
Example 2: time text format kotlin android studio
val currentDate: String = SimpleDateFormat("dd/MM/yyyy", Locale.getDefault()).format(Date())
//for date