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

 

posted @ 2018-09-14 11:26  生心无住  阅读(12650)  评论(0编辑  收藏  举报