Here, we will create an object of the Date class. Then we will set the date-time using setTime(). The setTime() method accepts date time in milliseconds. After that, we will print the updated DateTime on the console screen.
Scala program to set datetime using setTime() method
belongs to collection: Scala Date & Time Programs
total answers (1)