Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I am having difficulty with the Day of week number function in SQL. The excel equivalent i use frequently is...
=WEEKDAY("datevalue",1)
This of course will return Sunday = 1, Monday = 2 etc... What is the Access Sql equivalent?
这足以得到所需的答案。
weekday(date)
我相信您正在寻找DatePart:
DatePart
DatePart ("w", date)
参考
这会有所帮助
DATEPART(dd, date)
返回整数
它是日期部分()
例如 DatePart ("yyyy", #15/10/1998#) 将返回 1998 DatePart ("m", #15/10/2003#) 将返回 10 DatePart ("d", #15/10/2003#) 将返回 15
例如
DatePart ("yyyy", #15/10/1998#) 将返回 1998
DatePart ("m", #15/10/2003#) 将返回 10
DatePart ("d", #15/10/2003#) 将返回 15