hive 字符串截取


语法 :substr(字段,starindex,len)  下标从 1 开始

测试

select substr(order_dt,0,10)
from siebel_cx_order 
where dt=20180831 
limit 10;


2018-08-31
2018-08-31
2018-08-31
2018-08-31
2018-08-31
2018-08-31
2018-08-31
2018-08-31
2018-08-31
2018-08-31

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM