I am trying to generate a new epoch timestamp(eg 1435655706000) in scala. I've used the below function but got time format.
Val timestamp: Timestamp = new Timestamp(System.currentTimeMillis())
I am trying to generate a new epoch timestamp(eg 1435655706000) in scala. I've used the below function but got time format.
Val timestamp: Timestamp = new Timestamp(System.currentTimeMillis())
Use java.time
instances when you work with time
java.time.Instant.now.toEpochMilli