why not just replace / to - by internal string functions? On Thu, Jan 29, 2015 at 2:38 PM, Jason Dere <jd...@hortonworks.com> 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 <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.png> > > *Query: select to_date(stringTotimestamp(date)) from rm_get limit 1;* > *Result: Null* > > What may be the issue? > -- > With Thanks & Regards > Nagarjuna Vissarapu > 9052179339 > > <DateSet.java> > > > > CONFIDENTIALITY NOTICE > NOTICE: This message is intended for the use of the individual or entity > to which it is addressed and may contain information that is confidential, > privileged and exempt from disclosure under applicable law. If the reader > of this message is not the intended recipient, you are hereby notified that > any printing, copying, dissemination, distribution, disclosure or > forwarding of this communication is strictly prohibited. If you have > received this communication in error, please contact the sender immediately > and delete it from your system. Thank You. -- Thanks, Dayong