关于Hive的常用查询 日期 时间戳转日期格式(15位) 1 Select from_unixtime(cast(cast(time as bigint) / 1000 as BIGINT) ) 获取当前日期时间 1 select from_unixtime(unix_timestamp(),'yyyy-MM-dd HH:mm:ss') 返回日期部分; to_date() –返回日期部分(字符串格式) 1 select to_date() 日期增减 1 select date_add(string startdate, int days) 赞微海报分享
近期评论