创建一个月的日期列表 [英] Create A List Of Dates In A Month

查看:76
本文介绍了创建一个月的日期列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Access用户在新闻组中看到了我的名字,并向我发送了一个关于

项目帮助的请求。作为项目的一部分,一个月的日期列表需要

。对于需要一个月中的日期列表的人来说,这是我使用的:


1.创建一个名为TblNumbers的表,其中一个字段名为Num并填充

表格为1到31

2.根据TblNumbers创建查询

3.将Num拉入查询的第一个字段。

4.将以下表达式放入Num的标准中:

< = Day(DateSerial(6,1 + 1,0))

5.放入在查询的第二个字段中跟随表达式:

MonthDate:DateSerial(6,1,[Num])

6.将以下表达式放在第三个字段中查询:

=日([MonthDate])

7.将以下表达式放在查询的第四个字段中:

=格式( [MonthDate]," ddd")

8.将以下表达式放在查询的第五个字段中:

=格式([MonthDate]," dddd" )

9.运行查询。


查询将返回本月的所有日期(J anuary 06)在

第二列。第三列将包含每个

日期的当月日期。第四列将包含每个日期

日的三个字母缩写。第五列将包含每个日期的星期几的全名




在DateSerial表达式中,6是年份(06)和1是

月的数量。您可以通过修改DateSerial函数使查询返回任何年份和月份的日期,以使表格上的6和1可选。

-

PC数据表

您的资源获取Access,Excel和Word应用程序的帮助

超过1075位用户来自新闻组请求帮助
re******@pcdatasheet.com

An Access user saw my name in a newsgroup and sent me a request for help on
a project. As part of the project, a list of the dates in a month was
needed. For anyone needing a list of dates in a month, here is what I used:

1. Create a table named TblNumbers with one field named Num and populate
the table with 1 to 31
2. Create a query based on TblNumbers
3. Pull down Num into the first field of the query.
4. Put the following expression in the criteria for Num:
<=Day(DateSerial(6,1+1,0))
5. Put the following expression in the second field of the query:
MonthDate: DateSerial(6,1,[Num])
6. Put the following expression in the third field of the query:
=Day([MonthDate])
7. Put the following expression in the fourth field of the query:
=Format([MonthDate],"ddd")
8. Put the following expression in the fifth field of the query:
= Format([MonthDate],"dddd")
9. Run the query.

The query will return all the dates for this month (January 06) in the
second column. The third column will contain the day of the month for each
date. The fourth column will contain the three letter abbreviation for the
day of the week for each date. The fifth column will contain the full name
of the day of the week for each date.

In the DateSerial expression, 6 is the year (06) and 1 is the number of the
month. You can make the query return the dates for any year and month by
modifying the DateSerial function to make the 6 and 1 selectable on a form.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1075 users have come to me from the newsgroups requesting help
re******@pcdatasheet.com

推荐答案



引用Arno:


这里的大多数人都认为新闻组是免费的

交换信息*。

但史蒂夫是这些团体中臭名昭着的求职者,总是试图出售他的服务。


在您打算与他做生意之前,请查看:
http://home.tiscali.nl/arracom/whoissteve.html


" PC数据表" <无**** @ nospam.spam>在消息中写道

news:n _ ***************** @ newsread2.news.atl.earthl ink.net ...

To quote Arno:

Most people here have a common belief that the newsgroups are for *free
exchange of information*.
But Steve is a notorious job hunter in these groups, always trying to sell
his services.

Before you intend to do business with him look at:
http://home.tiscali.nl/arracom/whoissteve.html

"PC Datasheet" <no****@nospam.spam> wrote in message
news:n_*****************@newsread2.news.atl.earthl ink.net...
Access用户在新闻组中看到了我的名字,并向我发送了一个项目请求帮助
。作为项目的一部分,需要一个月的日期列表。对于需要一个月中的日期列表的人来说,这是我使用的

1.创建一个名为TblNumbers的表,其中一个字段名为Num,并用1到31填充表格 br /> 2.基于TblNumbers创建查询
3.将Num拉入查询的第一个字段。
4.将以下表达式放入Num的标准中:
< = Day(DateSerial(6,1 + 1,0))
5.将以下表达式放在查询的第二个字段中:
MonthDate:DateSerial(6,1,[Num])
= Day([MonthDate])
7.将以下表达式放在查询的第四个字段中:
=格式([MonthDate]," ddd")
8.将以下表达式放在查询的第五个字段中:
=格式([MonthDate]," dddd")
9运行查询。

查询将返回
第二列中本月(1月06日)的所有日期。第三列将包含每个
日期的月份日期。第四列将包含每个日期的星期几的三个字母缩写。第五列将包含每个日期的星期几的完整
名称。

在DateSerial表达式中,6是年份(06),1是$ b的数字每月$ b。您可以通过修改DateSerial函数使查询返回任何年份和月份的日期,以便在
表格中选择6和1。

-
PC数据表
您的资源以获取访问,Excel和Word应用程序的帮助
超过1075位用户来自新闻组请求
帮助 re ****** @ pcdatasheet.com
An Access user saw my name in a newsgroup and sent me a request for help on a project. As part of the project, a list of the dates in a month was
needed. For anyone needing a list of dates in a month, here is what I used:
1. Create a table named TblNumbers with one field named Num and populate
the table with 1 to 31
2. Create a query based on TblNumbers
3. Pull down Num into the first field of the query.
4. Put the following expression in the criteria for Num:
<=Day(DateSerial(6,1+1,0))
5. Put the following expression in the second field of the query:
MonthDate: DateSerial(6,1,[Num])
6. Put the following expression in the third field of the query:
=Day([MonthDate])
7. Put the following expression in the fourth field of the query:
=Format([MonthDate],"ddd")
8. Put the following expression in the fifth field of the query:
= Format([MonthDate],"dddd")
9. Run the query.

The query will return all the dates for this month (January 06) in the
second column. The third column will contain the day of the month for each
date. The fourth column will contain the three letter abbreviation for the
day of the week for each date. The fifth column will contain the full name of the day of the week for each date.

In the DateSerial expression, 6 is the year (06) and 1 is the number of the month. You can make the query return the dates for any year and month by
modifying the DateSerial function to make the 6 and 1 selectable on a form.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1075 users have come to me from the newsgroups requesting help re******@pcdatasheet.com



我是不知道你为什么不把这个小费放在你的网站上的访问/ Excel提示页面

(这是空白/正在建设中)?这就是我所相信的最好的事情,而不是说有人问你一个问题

离线。我不是在暗示你没有得到一个合法的问题离线

但是像你在所有这些新闻组中所做的那样发帖有点不寻常。

我相信网上还有其他论坛更接受

访问提示(和广告;-)。


-

Duane Hookom

MS Access MVP

-


" PC数据表" <无**** @ nospam.spam>在消息中写道

news:n _ ***************** @ newsread2.news.atl.earthl ink.net ...
I''m not sure why you didn''t just put this tip in the Access/Excel Tips page
on your web site (which is blank/under construction)? That''s what I believe
most would have done rather than stating that someone asked you a question
off line. I''m not suggesting you didn''t get a legitimate question off line
but it is just a bit unusual to post like you did in all these news groups.

I believe there are other forums on the web that are more accepting of
Access tips (and advertising ;-).

--
Duane Hookom
MS Access MVP
--

"PC Datasheet" <no****@nospam.spam> wrote in message
news:n_*****************@newsread2.news.atl.earthl ink.net...
Access用户在新闻组中看到了我的名字,并向我发送了关于项目的帮助请求。作为项目的一部分,需要一个月的日期列表。对于需要一个月中的日期列表的人来说,这是我使用的:

1.创建一个名为TblNumbers的表,其中一个字段名为Num,并填充表格1到31
2.基于TblNumbers创建查询
3.将Num拉入查询的第一个字段。
4.将以下表达式放入Num的标准中:
< = Day(DateSerial(6,1 + 1,0))
5.将以下表达式放在查询的第二个字段中:
MonthDate:DateSerial(6,1,[Num ])
6.将以下表达式放在查询的第三个字段中:
= Day([MonthDate])
7.将以下表达式放在查询的第四个字段中:
= Format([MonthDate]," ddd")
8.将以下表达式放在查询的第五个字段中:
= Format([MonthDate]," dddd")
9.运行查询。

查询将返回
第二列中本月(1月06日)的所有日期。第三列将包含每个
日期的月份日期。第四列将包含每个日期的星期几的三个字母缩写。第五列将包含每个日期的星期几的完整名称。

在DateSerial表达式中,6是年份(06),1是,以便在
表单上选择6和1。

-
PC数据表
您的资源获取Access,Excel和Word应用程序的帮助
超过1075位用户来自新闻组请求帮助
re ****** @ pcdatasheet.com
An Access user saw my name in a newsgroup and sent me a request for help
on a project. As part of the project, a list of the dates in a month was
needed. For anyone needing a list of dates in a month, here is what I
used:

1. Create a table named TblNumbers with one field named Num and populate
the table with 1 to 31
2. Create a query based on TblNumbers
3. Pull down Num into the first field of the query.
4. Put the following expression in the criteria for Num:
<=Day(DateSerial(6,1+1,0))
5. Put the following expression in the second field of the query:
MonthDate: DateSerial(6,1,[Num])
6. Put the following expression in the third field of the query:
=Day([MonthDate])
7. Put the following expression in the fourth field of the query:
=Format([MonthDate],"ddd")
8. Put the following expression in the fifth field of the query:
= Format([MonthDate],"dddd")
9. Run the query.

The query will return all the dates for this month (January 06) in the
second column. The third column will contain the day of the month for each
date. The fourth column will contain the three letter abbreviation for the
day of the week for each date. The fifth column will contain the full
name of the day of the week for each date.

In the DateSerial expression, 6 is the year (06) and 1 is the number of
the month. You can make the query return the dates for any year and month
by modifying the DateSerial function to make the 6 and 1 selectable on a
form.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1075 users have come to me from the newsgroups requesting help
re******@pcdatasheet.com



万一有人也想知道,今天我有一个大钱客户谁给我一个小的加勒比岛屿支付给我这个:


函数MultByTwo(d为双)

MultByTwo = d * 2

结束功能


我为此特别自豪。这是第57,365位被联系的人因为他们本月在新闻组上看到了我的名字。

" Duane Hookom" <杜********* @ NoSpamHotmail.com>在消息中写道

新闻:eZ ************** @ TK2MSFTNGP14.phx.gbl ...
Just in case anyone was also wondering, I had a big money client today who
paid me a small Caribbean island for coming up with this:

function MultByTwo(d as double)
MultByTwo=d*2
end function

I''m particularly proud of that. That''s the 57,365th person who''s contacted
me because they''ve seen my name on a newsgroup this month.
"Duane Hookom" <du*********@NoSpamHotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
我不是确定你为什么不把这个小费放在你网站上的Access / Excel Tips
页面上(这是空白/正在建设中)?这就是我认为大多数人会做的事情,而不是说有人问你一个问题离线。我不是在暗示你没有得到一个合法的问题离线
但是像你在所有这些新闻
组中所做的那样发帖有点不寻常。
我相信那里网上的其他论坛更接受
访问提示(和广告;-)。

-
Duane Hookom
MS Access MVP -

PC数据表 <无**** @ nospam.spam>在消息中写道
新闻:n _ ***************** @ newsread2.news.atl.earthl ink.net ...
I''m not sure why you didn''t just put this tip in the Access/Excel Tips page on your web site (which is blank/under construction)? That''s what I believe most would have done rather than stating that someone asked you a question
off line. I''m not suggesting you didn''t get a legitimate question off line
but it is just a bit unusual to post like you did in all these news groups.
I believe there are other forums on the web that are more accepting of
Access tips (and advertising ;-).

--
Duane Hookom
MS Access MVP
--

"PC Datasheet" <no****@nospam.spam> wrote in message
news:n_*****************@newsread2.news.atl.earthl ink.net...
An Access用户在新闻组中看到了我的名字,并向我发送了关于项目的帮助请求。作为项目的一部分,需要一个月的日期列表。对于需要一个月中的日期列表的人来说,这是我使用的:

1.创建一个名为TblNumbers的表,其中一个字段名为Num,
填充表格1到31
2.基于TblNumbers创建查询
3.将Num拉入查询的第一个字段。
4.将以下表达式放入Num的标准中:
< = Day(DateSerial(6,1 + 1,0))
5.将以下表达式放在查询的第二个字段中:
MonthDate:DateSerial(6,1,[Num ])
6.将以下表达式放在查询的第三个字段中:
= Day([MonthDate])
7.将以下表达式放在查询的第四个字段中:
= Format([MonthDate]," ddd")
8.将以下表达式放在查询的第五个字段中:
= Format([MonthDate]," dddd")
9.运行查询。

查询将返回
第二列中本月(1月06日)的所有日期。第三列将包含每个日期
的月份日期。第四列将包含每个日期的星期几的
的三个字母缩写。第五列将包含每个日期的星期几的完整名称。

在DateSerial表达式中,6是年份(06),1是月份,以便在
表单上选择6和1。

-
PC数据表
您的资源获取Access,Excel和Word帮助
应用程序超过1075位用户来自新闻组请求
帮助 re ****** @ pcdatasheet.com
An Access user saw my name in a newsgroup and sent me a request for help
on a project. As part of the project, a list of the dates in a month was
needed. For anyone needing a list of dates in a month, here is what I
used:

1. Create a table named TblNumbers with one field named Num and populate the table with 1 to 31
2. Create a query based on TblNumbers
3. Pull down Num into the first field of the query.
4. Put the following expression in the criteria for Num:
<=Day(DateSerial(6,1+1,0))
5. Put the following expression in the second field of the query:
MonthDate: DateSerial(6,1,[Num])
6. Put the following expression in the third field of the query:
=Day([MonthDate])
7. Put the following expression in the fourth field of the query:
=Format([MonthDate],"ddd")
8. Put the following expression in the fifth field of the query:
= Format([MonthDate],"dddd")
9. Run the query.

The query will return all the dates for this month (January 06) in the
second column. The third column will contain the day of the month for each date. The fourth column will contain the three letter abbreviation for the day of the week for each date. The fifth column will contain the full
name of the day of the week for each date.

In the DateSerial expression, 6 is the year (06) and 1 is the number of
the month. You can make the query return the dates for any year and month by modifying the DateSerial function to make the 6 and 1 selectable on a
form.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications Over 1075 users have come to me from the newsgroups requesting help re******@pcdatasheet.com




这篇关于创建一个月的日期列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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