Re: date_add statement problem

2015-01-16 Thread Jason Dere
Devopam is right, your date format looks wrong (should be -mm-dd rather than /mm/dd. Casting should work, trying this with Hive trunk: hive> select c1, date_add('1985-01-01', c1) from short1; FAILED: SemanticException [Error 10014]: Line 1:11 Wrong arguments 'c1': DATE_ADD() only takes

Re: date_add statement problem

2015-01-16 Thread Devopam Mittra
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 wrote: > Hi, > > > > I’ve been facing some issues in using date_add() > > > > I have column ‘*day_key*’ that is short integer and stores day

date_add statement problem

2015-01-15 Thread Yashwanth M
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