Re: Unable to retrieve date

2015-01-29 Thread Nagarjuna Vissarapu
Help full thank you On Jan 30, 2015 11:45 AM, "Devopam Mittra" wrote: > please consider not writing a new UDF and instead using the following > syntax with built-in UDFs itself . > > SELECT > from_unixtime(unix_timestamp('07/Dec/2014:23:59:04','dd/MMM/:HH:mm:ss'), > 'dd-MMM- HH:mm:ss') >

Re: Unable to retrieve date

2015-01-29 Thread Devopam Mittra
please consider not writing a new UDF and instead using the following syntax with built-in UDFs itself . SELECT from_unixtime(unix_timestamp('07/Dec/2014:23:59:04','dd/MMM/:HH:mm:ss'), 'dd-MMM- HH:mm:ss') FROM twitter_data_raw LIMIT 1; feel free to play around with the formats to get desi

Re: Unable to retrieve date

2015-01-29 Thread DU DU
why not just replace / to - by internal string functions? On Thu, Jan 29, 2015 at 2:38 PM, Jason Dere wrote: > to_date() expects a string like '2014-12-07 23:59:04' rather than > '07-Dec-2014 23:59:04' > > > On Jan 29, 2015, at 1:42 AM, Nagarjuna Vissarapu > wrote: > > Hi All, > > I wrote hive

Re: Unable to retrieve date

2015-01-29 Thread Jason Dere
to_date() expects a string like '2014-12-07 23:59:04' rather than '07-Dec-2014 23:59:04' On Jan 29, 2015, at 1:42 AM, Nagarjuna Vissarapu wrote: > Hi All, > > I wrote hive UDF to convert > > 07/Dec/2014:23:59:04 to 07-Dec-2014 23:59:04 > > I attached UDF. PFA ... > > I added jar to hiv

Unable to retrieve date

2015-01-29 Thread Nagarjuna Vissarapu
Hi All, I wrote hive UDF to convert 07/Dec/2014:23:59:04 to 07-Dec-2014 23:59:04 I attached UDF. PFA ... I added jar to hive and created temporary function *stringTotimestampQuery: select stringTotimestamp(date) from rm_get limit 1;* *Result: * [image: Inline image 1] *Query: select to_date