hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devopam Mittra <devo...@gmail.com>
Subject Re: date_add statement problem
Date Fri, 16 Jan 2015 09:09:43 GMT
hi Yashwanth,
Can you please check once if  DATE_ADD('1985-01-01', day_key) works for you

regards
Devopam


On Fri, Jan 16, 2015 at 1:12 PM, Yashwanth M <Yashwanth.M@mu-sigma.com>
wrote:

>  Hi,
>
>
>
> I’ve been facing some issues in using date_add()
>
>
>
> I have column ‘*day_key*’  that is short integer and stores day keys with
> respect to 1985/01/01.
>
>
>
> I need to extract actual date from this column.
>
>
>
> *Date_add(‘1985/01/01’,day_key)*
>
> However I get an error saying the second argument needs integer.
>
>
>
> I also did
>
> *Date_add(‘1985/01/01’,cast(day_key as int))*
>
> Resulted in an error saying the column is short.
>
>
>
> Please help me with this.
>
>
>
> Thanks
>
> Regards,
>
> Yashwanth M *|* +91 8884 177 884 *|*www.mu-sigma.com *|*
>
>
>  Disclaimer: http://www.mu-sigma.com/disclaimer.html
>



-- 
Devopam Mittra
Life and Relations are not binary

Mime
View raw message