I wrote the following code
Date d = new Date();
CharSequence s = DateFormat.format(\"MMMM d, yyyy \", d.getTime());
But is asking me para
In Kotlin
https://www.programiz.com/kotlin-programming/examples/current-date-time
fun main(args: Array) {
val current = LocalDateTime.now()
val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS")
val formatted = current.format(formatter)
println("Current Date and Time is: $formatted")}