2

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?

4

4 回答 4

2

这足以得到所需的答案。

weekday(date)
于 2012-11-28T15:45:33.107 回答
2

我相信您正在寻找DatePart

DatePart ("w", date)

参考

于 2012-11-28T15:43:31.627 回答
1

这会有所帮助

DATEPART(dd, date)

返回整数

于 2012-11-28T15:44:40.237 回答
0

它是日期部分()

例如

DatePart ("yyyy", #15/10/1998#) 将返回 1998

DatePart ("m", #15/10/2003#) 将返回 10

DatePart ("d", #15/10/2003#) 将返回 15

于 2012-11-28T15:46:05.660 回答