当前位置:网站首页>How sparksql returns a specific day of the week by date -dayofweek function
How sparksql returns a specific day of the week by date -dayofweek function
2022-06-26 17:21:00 【Big data Xiao Wang】
dayofweek Function returns the workday index value of the date , That is, Sunday is 1, Monday 2, Think of six for 7
And how to turn the common Monday into 1, Zhou Erwei 2, Wednesday is 3,... Zhou 6 position 6, Sunday is 7
select if((dayofweek('2022-06-23')-1)%7=0,7,(dayofweek('2022-06-23')-1)%7);
select dayofweek('2022-06-23') 
边栏推荐
- 探讨:下一代稳定币
- [qt learning notes]qt inter thread data communication and data sharing
- Deployment and operation of mongodb partitioned cluster
- Leetcode topic [array] -268- missing numbers
- She said she was tired! So tired! I want to change my career
- SQL injection for Web Security (3)
- 去中心化NFT交易协议将击败OpenSea
- Swap two numbers
- Jouer avec Linux et installer et configurer MySQL facilement
- Strength and appearance Coexist -- an exclusive interview with Liu Yu, a member of Apache pulsar PMC
猜你喜欢

Redis and database data consistency

MySQL index

Treasure and niche CTA animation material website sharing

Deployment and operation of mongodb partitioned cluster

Romance of the Three Kingdoms: responsibility chain model

【推荐系统学习】推荐系统的技术栈

What is the difference between digital collections and NFT

Distributed Architecture Overview

Platform management background and merchant menu resource management: Design of platform management background data service

A simple membership card management system based on Scala
随机推荐
Programmer interview guide - self introduction
7 views on NFT market prospect
Incomplete line spacing adjustment of formula display in word
y=1/100*100+1/200*200+1/300*300+.....+ 1/m*m
[latex bearer] use tables in \title (error \begin doesn't match its definition.)
Introduction to distributed cache / cache cluster
Platform management background and merchant menu resource management: Design of platform management background data service
Necessary decorator mode for 3 years' work
[recommendation system learning] recommendation system architecture
Cloud native 02: Alibaba cloud cloud efficient flow pipeline
Leetcode daily [2022 - 02 - 16]
LeetCode——226. 翻轉二叉樹(BFS)
Calculate the sum of the main diagonals of the array
Toupper function
玩轉Linux,輕松安裝配置MySQL
MySql 导出数据库中的全部表索引
Sandboxed container: container or virtual machine
Quantitative contract system development analysis case - detailed explanation of contract quantitative system development scheme
Introduction to minimal API
Teach you to learn dapr - 1 The era of net developers