Convert 2016-08-27 string to date in hive -


i using code below convert date format output null.

select from_unixtime(unix_timestamp(b.temp,'yyyymmdd'), 'yyyymmdd') temp1  ([![enter image description here][1]][1] select a.*, regexp_replace(a.ao_date,'-','') temp clla_samp_base ) b ; 

any appreciated!

2016-08-27 in iso date format date format acceptable hive "as is".

hive> select cast ('2016-08-27' date) dt;  ok dt 2016-08-27 

p.s.
if have column containning values in format, can define column type date in first place.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -