Help full thank you On Jan 30, 2015 11:45 AM, "Devopam Mittra" <devo...@gmail.com> 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/yyyy:HH:mm:ss'), > 'dd-MMM-yyyy HH:mm:ss') > FROM twitter_data_raw LIMIT 1; > > feel free to play around with the formats to get desired results > > regards > Devopam > > > On Thu, Jan 29, 2015 at 3:12 PM, Nagarjuna Vissarapu < > nagarjuna.v...@gmail.com> 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 hive and created temporary function >> >> >> *stringTotimestampQuery: select stringTotimestamp(date) from rm_get limit >> 1;* >> *Result: * >> [image: Inline image 1] >> >> *Query: select to_date(stringTotimestamp(date)) from rm_get limit 1;* >> *Result: Null* >> >> What may be the issue? >> -- >> With Thanks & Regards >> Nagarjuna Vissarapu >> 9052179339 >> >> > > > -- > Devopam Mittra > Life and Relations are not binary >