You could also use the jodatime library, which has a ton of great other
options in it.
J
ᐧ




*JIMMY MCERLAIN*

DATA SCIENTIST (NERD)

*. . . . . . . . . . . . . . . . . .*


*IF WE CAN’T DOUBLE YOUR SALES,*



*ONE OF US IS IN THE WRONG BUSINESS.*

*E*: ji...@sellpoints.com

*M*: *510.303.7751*

On Thu, Nov 13, 2014 at 10:40 AM, Akhil Das <ak...@sigmoidanalytics.com>
wrote:

> 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 <s...@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-unsubscr...@spark.apache.org
>> For additional commands, e-mail: user-h...@spark.apache.org
>>
>>
>

Reply via email to