How to change date format in hive?

前端 未结 4 1533
梦如初夏
梦如初夏 2020-12-10 12:26

My table in hive has a filed of date in the format of \'2016/06/01\'. but i find that it is not in harmory with the format of \'2016-06-01\'. They can not compare for insta

4条回答
  •  星月不相逢
    2020-12-10 12:58

    Use :

    unix_timestamp(DATE_COLUMN, string pattern)
    

    The above command would help convert the date to unix timestamp format which you may format as you want using the Simple Date Function.

    Date Function

提交回复
热议问题