摘要:
1、round() 浮点数四舍五入: 浮点数取两位小数: 小数点位数是负数,比如-2,那么小数点前2位为0,且进行四舍五入计算。 2、floor() 浮点数最小取整数(往小取整) 3、ceil() 浮点数最大取整数(往大取整) 阅读全文
posted @ 2022-04-29 10:32
虾卡辣卡~
阅读(555)
评论(0)
推荐(0)
摘要:
1)date_format函数(根据格式整理日期) 作用:把一个字符串日期格式化为指定的格式。 select date_format('2017-01-01','yyyy-MM-dd HH:mm:ss'); --日期字符串必须满足yyyy-MM-dd格式 结果:2017-01-01 00:00:00 阅读全文
posted @ 2022-04-29 10:12
虾卡辣卡~
阅读(4368)
评论(0)
推荐(1)
摘要:
Cast(字段名 as 转换的类型 ) 其中类型可以为: CHAR[(N)] 字符型DATE 日期型DATETIME 日期和时间型DECIMAL float型SIGNED intTIME 时间型 阅读全文
posted @ 2022-04-29 10:02
虾卡辣卡~
阅读(36)
评论(0)
推荐(0)
摘要:
日期减少函数: date_sub 语法: date_sub (string startdate, int days) 返回值: string 说明:返回开始日期startdate减少days天后的日期。 举例: hive> select date_sub('2012-12-08',10) from 阅读全文
posted @ 2022-04-29 09:44
虾卡辣卡~
阅读(397)
评论(0)
推荐(0)
摘要:
hive 正则匹配 regexp,regexp_extract,regexp_replace 语法介绍: regexp 语法: A REGEXP B 操作类型: strings 描述: 功能与RLIKE相同 regexp_extract 语法: regexp_extract(string subje 阅读全文
posted @ 2022-04-29 09:38
虾卡辣卡~
阅读(287)
评论(0)
推荐(0)