spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mich Talebzadeh <mich.talebza...@gmail.com>
Subject Re: hivecontext and date format
Date Wed, 01 Jun 2016 11:23:34 GMT
Try this

SELECT

TO_DATE(FROM_UNIXTIME(UNIX_TIMESTAMP(paymentdate,'dd/MM/yyyy'),'yyyy-MM-dd'))
AS paymentdate
FROM

HTH

Dr Mich Talebzadeh



LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*



http://talebzadehmich.wordpress.com



On 1 June 2016 at 12:16, pseudo oduesp <pseudo20140@gmail.com> wrote:

> Hi ,
> can i ask you how we can convert string like dd/mm/yyyy to date type in
> hivecontext?
>
> i try with unix_timestemp and with format date but i get null .
> thank you.
>

Mime
View raw message