spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akhil Das <ak...@sigmoidanalytics.com>
Subject Re: how to convert System.currentTimeMillis to calendar time
Date Thu, 13 Nov 2014 18:40:44 GMT
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 <spr@yarcdata.com> 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: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>
>

Mime
View raw message