Skip to main content
naush_madaka07
Bronze ⭐️⭐️⭐️
May 27, 2021
Solved

Oracle Query conversion to Hive?

I am really new to Hive/Impala. I am looking to convert some SQL queries into Hive.

 

I have  a column called date (Ex:2011-09-22 05:01:38) and I would like to convert it into the following format: 09-22-2011-05.01.38 AM

 

Any help is appreciated.

ChethanYM
ChethanYMAnswer
Gold ⭐️
May 28, 2021

Hi ,

To change the format of the input time we need to use unix_timestamp along with from_unixtime funcitons.

 

Can you check this below Cloudera community article:

https://community.cloudera.com/t5/Support-Questions/Format-date-in-HIVE/td-p/203463

 

 

2 replies

ChethanYM
Gold ⭐️
ChethanYMAnswer
Gold ⭐️
May 28, 2021

Hi ,

To change the format of the input time we need to use unix_timestamp along with from_unixtime funcitons.

 

Can you check this below Cloudera community article:

https://community.cloudera.com/t5/Support-Questions/Format-date-in-HIVE/td-p/203463

 

 

Translate
cjervis
Community Manager
Community Manager
June 3, 2021

@naush_madaka07 Has your issue been resolved? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. 

 

Screen Shot 2019-08-06 at 1.54.47 PM.pngmark as solution button

Translate
Keep the questions coming