hive 当年第一天
时间: 2023-10-18 21:25:56 浏览: 182
要获取Hive中当年的第一天,可以使用以下SQL语句:
```
SELECT trunc(current_date, 'YEAR') AS 当年第一天 FROM dual;
```
这个语句中,`trunc`函数将当前日期截断到年份,并返回当年的第一天。`'YEAR'`参数指定截断的单位为年。执行这个语句后,就可以得到Hive中当年的第一天。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Hive常用日期函数](https://blog.csdn.net/qq_44696532/article/details/116536245)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [第12章 Hive1](https://download.csdn.net/download/weixin_35811254/86347759)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文