select unix_timestamp(); select unix_timestamp("2020-10-28",'yyyy-MM-dd');
select from_unixtime(1603843200);
select current_date;
select current_timestamp;
select to_date('2020-10-28 12:12:12');
select year('2020-10-28 12:12:12');
select month('2020-10-28 12:12:12');
select day('2020-10-28 12:12:12');
select hour('2020-10-28 12:12:12');
select minute('2020-10-28 12:12:12');
select second('2020-10-28 12:12:12');
select weekofyear('2020-10-28 12:12:12');
select dayofmonth('2020-10-28 12:12:12');
select months_between('2020-04-01','2020-10-28');
select add_months('2020-10-28',-3);
select datediff('2020-11-04','2020-10-28');
select date_add('2020-10-28',4);
select date_sub('2020-10-28',-4);
select last_day('2020-02-30');
select date_format('2020-10-28 12:12:12','yyyy/MM/dd HH:mm:ss');
select round(3.14); select round(3.54);
select ceil(3.14); select ceil(3.54);
select floor(3.14); select floor(3.54);
select upper('low');
select lower('low');
select length("atguigu");
select trim(" atguigu ");
select lpad('atguigu',9,'g');
select rpad('atguigu',9,'g');
SELECT regexp_replace('2020/10/25', '/', '-');
select size(friends) from test3;
select map_keys(children) from test3;
select map_values(children) from test3;
select array_contains(friends,'bingbing') from test3;
select sort_array(friends) from test3;
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。