How to calculate Date difference in Hive

后端 未结 4 1999
梦如初夏
梦如初夏 2021-02-01 04:17

I\'m a novice. I have a employee table with a column specifying the joining date and I want to retrieve the list of employees who have joined in the last 3 months. I understand

4条回答
  •  醉梦人生
    2021-02-01 05:13

    I would try this first

    select * from employee where month(current_date)-3 = month(joining_date)
    

提交回复
热议问题