当前位置:网站首页>In spark SQL, date is used to display the day of the week according to the year, month and day_ format(date,‘u‘)
In spark SQL, date is used to display the day of the week according to the year, month and day_ format(date,‘u‘)
2022-07-26 01:30:00 【Big data Wang】
====SparkSQL in
select date_format(now(),'u')
select date_format('2022-07-02','u')
result ==》6
select date_format('2022-07-03','u')
result ==》7
select date_format('2022-07-04','u')
result ==》1
select date_format('2022-07-05','u')
result ==》2
select date_format('2022-07-06','u')
result ==》3
select date_format('2022-07-07','u')
result ==》4
select date_format('2022-07-08','u')
result ==》5Be careful :
select date_format('2022-07-02','u')
result ==》6
date_format(date,'u') function hivesql and sparksql support , however mysql and doris as well as prestosql Neither support
example :
select instr("abc", "b");
result ==》2
select date_format('2022-07-22','u')
result ==》5
select instr('1-2-3-4-5-6-7',date_format('2022-07-22', 'u'))
result ==》9
select instr('1-2-3-4-5-6-7',date_format('2022-07-22', 'u'))>0
result ==》true
边栏推荐
- Force buckle 25. Turn over the linked list in a group of K
- 8、学习MySQL 创建数据表
- Understand Linglong platform unified access service from simple to deep Monet
- Web middleware log analysis script 3.0 (shell script)
- 当博客被黑客攻击时该怎么办?
- 2022年最新北京建筑八大员(材料员)模拟考试试题及答案
- Server available resources query script
- FreeBSD bnxt以太网驱动源码阅读记录二:
- Leetcode 537. complex multiplication (netizens' thoughts, ashamed)
- Nodejs builds cloud native microservice applications based on dapr, a quick start guide from 0 to 1
猜你喜欢

FreeBSD bNXT Ethernet driver source code reading record 2:

Arthas watch 命令查看数组中对象的属性

Prime Ring Problem

1.30 upgrade bin file, add suffix and file length

如何获取广告服务流量变现数据,助力广告效果分析?

Docker高级篇-Mysql主从复制

RHCE之at和crontab命令详解及chrony部署

Prime Ring Problem

Lua basic grammar

Iftnews | suppose this is what the metauniverse looks like 20 years later
随机推荐
Oracle is nested at multiple levels, and the alias problem of the table cannot be found
What should I do when my blog is attacked by hackers?
C语言进阶(一)动态分配内存
Mulda: a multilingual data augmentation framework for low resource cross linguistic ner reading notes
B - Krypton Factor(dfs+回溯法)
聚势|海泰方圆亮相第五届数字中国建设峰会
服务器可用资源查询脚本
I just test it
数据库系统原理与应用教程(055)—— MySQL 查询(十七):数学函数的用法
当博客被黑客攻击时该怎么办?
NLP introduction + practice: Chapter 3: gradient descent and back propagation
Dijkstra 求最短路
Tencent employees' salary: the real 985 graduation salary, do you think I can be saved? Netizen: daily salary?
数据库系统原理与应用教程(057)—— MySQL 练习题
[Unity] 二维洞穴地图随机生成
Pycharm automatically adds header comments when creating py files
Case when of SQL
Half of the people in the country run in Changsha. Where do half of the people in Changsha run?
What are the ways to quickly improve programming skills in the process of programming learning?
NiO simple example