How to get current Date (day month and year) and time (hour, minutes and seconds) all in local time in Kotlin?
I tried through LocalDateTime.now() but it is
LocalDateTime.now()
Try this :
val sdf = SimpleDateFormat("dd/M/yyyy hh:mm:ss") val currentDate = sdf.format(Date()) System.out.println(" C DATE is "+currentDate)