错误的周数 [英] Wrong Weeknumber

查看:72
本文介绍了错误的周数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我已经让这个msgbox显示当前的周数,但是它

显示错误的weekno。

谁能告诉我原因?


msg =" WeekNumber:" &安培; DatePart(WW,日期)

MsgBox消息


它显示2005年11月16日的weekno = 47,但它应该是

46.


最好的问候


Ronald

Hi

I have made this msgbox to display the current Week number, but it
shows the wrong weekno.
Can anyone tell me why ?

msg = "WeekNumber: " & DatePart("WW", Date)
MsgBox msg

It shows weekno = 47 for the date 16 november 2005, but it should be
46.

best regards

Ronald

推荐答案

查看帮助


也许您需要使用:

msg =" WeekNumber:" &安培; DatePart(WW,Date,vbFirstFullWeek)?

DatePart的返回值取决于在给定的一周内第一天被视为什么。

此外,Access需要知道什么是第一周。


Arno R


< bj ** @ vestas .COM> schreef在bericht新闻:11 ********************** @ f14g2000cwb.googlegr oups.com ...
Look at the Help

Maybe you need to use:
msg= "WeekNumber: " & DatePart("WW", Date , , vbFirstFullWeek) ?

The return value of DatePart depends on what is to be considered as the first day in a given week.
Also Access needs to know what is considered as the first week.

Arno R

<bj**@vestas.com> schreef in bericht news:11**********************@f14g2000cwb.googlegr oups.com...

我已经让这个msgbox显示当前的周数,但它显示错误的周数。
任何人都可以告诉我为什么?

msg =" WeekNumber: &安培; DatePart(WW,日期)
MsgBox消息

它显示2005年11月16日的weekno = 47,但它应该是
46.
<最好的问候

Ronald
Hi

I have made this msgbox to display the current Week number, but it
shows the wrong weekno.
Can anyone tell me why ?

msg = "WeekNumber: " & DatePart("WW", Date)
MsgBox msg

It shows weekno = 47 for the date 16 november 2005, but it should be
46.

best regards

Ronald



bj **@vestas.com 写道:


我已经让这个msgbox显示当前的周数,但它显示错误weekno。
谁能告诉我原因?

msg =" WeekNumber:" &安培; DatePart(" WW",Date)
MsgBox消息

它显示2005年11月16日的weekno = 47,但它应该是
46。
Hi

I have made this msgbox to display the current Week number, but it
shows the wrong weekno.
Can anyone tell me why ?

msg = "WeekNumber: " & DatePart("WW", Date)
MsgBox msg

It shows weekno = 47 for the date 16 november 2005, but it should be
46.




查看DatePart函数的第4个参数,你应该找到

你想要的周数。



Check out the 4th parameter to the DatePart function, you should find
what you are looking for for week numbers.


您好

感谢你们两位。第四个参数是线索。


谢谢你们好意思。


Ronald

Hi
Thank both of you. The 4th parameter was the clue.

Thank you wery mutch.

Ronald


这篇关于错误的周数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆