This way?

scala> val epoch = System.currentTimeMillis
epoch: Long = 1415903974545

scala> val date = new Date(epoch)
date: java.util.Date = Fri Nov 14 00:09:34 IST 2014



Thanks
Best Regards

On Thu, Nov 13, 2014 at 10:17 PM, spr <[email protected]> wrote:

> Apologies for what seems an egregiously simple question, but I can't find
> the
> answer anywhere.
>
> I have timestamps from the Spark Streaming Time() interface, in
> milliseconds
> since an epoch, and I want to print out a human-readable calendar date and
> time.  How does one do that?
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/how-to-convert-System-currentTimeMillis-to-calendar-time-tp18856.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to