Answers for "get formatted current date and time kotlin"

0

date format kotlin

import java.time.LocalDateTime
import java.time.format.DateTimeFormatter

fun main(args: Array<String>) {
    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")
}
// Current Date and Time is: 2021-04-10 10:28:21.052
Posted by: Guest on April-21-2021
-3

kotlin get current date

val currentDate=LocalDate.now();
Posted by: Guest on April-16-2021

Code answers related to "get formatted current date and time kotlin"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language