日期范围 [英] date range
问题描述
我从Access表格中选择其中日期> =''3/1/2004''和日期
< =''3/31/2004''",但没有记录。你能告诉我怎么做这个
比较吗?
谢谢
-
Andrew
Hi,
I select from an Access table " where date >= ''3/1/2004'' and date
<=''3/31/2004'' ", but no record. Can you tell me how to make this
comparission?
Thanks
--
Andrew
推荐答案
Andrew写道:
我从Access表中选择其中日期> =''3/1/2004''和日期
< =''3/31/2004''",但没有记录。你能告诉我怎么做这个
比较吗?
谢谢
Hi,
I select from an Access table " where date >= ''3/1/2004'' and date
<=''3/31/2004'' ", but no record. Can you tell me how to make this
comparission?
Thanks
Jet要求你用#来分隔文字日期。您应该使用ISO日期
格式,如下所示:
其中日期> =#2004-03-01#和日期< =#2004- 03-31#
鲍勃巴罗斯
-
微软MVP - ASP / ASP.NET
请回复到新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我
不经常检查它。如果您必须离线回复,请删除
无垃圾邮件
Jet requires you to use # to delimit literal dates. You should use ISO date
format, like this:
where date >=#2004-03-01# and date <=#2004-03-31#
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"
但访问日期时间格式仅限于3/31/2004 ,我怎么能让它运作?
谢谢
-
Andrew
" Bob Barrows <再****** @ NOyahoo.SPAMcom>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
But Access datetime format only has 3/31/2004, how can I make it work?
Thanks
--
Andrew
"Bob Barrows" <re******@NOyahoo.SPAMcom> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Andrew写道:
我从Access表中选择其中日期> =''3/1/2004''和日期
< =''3/31/2004''",但没有记录。你能告诉我怎么做这个
比较吗?
谢谢你需要用#来分隔文字日期。您应该使用ISO
Hi,
I select from an Access table " where date >= ''3/1/2004'' and date
<=''3/31/2004'' ", but no record. Can you tell me how to make this
comparission?
Thanks
Jet requires you to use # to delimit literal dates. You should use ISO
日期格式,如下所示:
其中date> =#2004-03-01#和date< =#2004- 03-31#
Bob Barrows
-
Microsoft MVP - ASP / ASP.NET
请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我不经常检查它。如果您必须离线回复,请删除
NO SPAM
date format, like this:
where date >=#2004-03-01# and date <=#2004-03-31#
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"
我要做的是从日期中选择月份或年份,对于
示例,
从表中选择*,其中thedate> =#2004- [var] -01#和thedate
< =#2004- [var] -31#
这意味着一个月内的所有记录。你能帮我吗?谢谢。
-
Andrew
" Bob Barrows" <再****** @ NOyahoo.SPAMcom>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
What I am going to do is to select the month or year from the date, for
example,
select * from table where thedate >=#2004-[var]-01# and thedate
<=#2004-[var]-31#
That means all the record in a month. Can you help? Thanks.
--
Andrew
"Bob Barrows" <re******@NOyahoo.SPAMcom> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Andrew写道:
我从Access表中选择其中日期> =''3/1/2004''和日期
< =''3/31/2004''",但没有记录。你能告诉我怎么做这个
比较吗?
谢谢你需要用#来分隔文字日期。您应该使用ISO
Hi,
I select from an Access table " where date >= ''3/1/2004'' and date
<=''3/31/2004'' ", but no record. Can you tell me how to make this
comparission?
Thanks
Jet requires you to use # to delimit literal dates. You should use ISO
日期格式,如下所示:
其中date> =#2004-03-01#和date< =#2004- 03-31#
Bob Barrows
-
Microsoft MVP - ASP / ASP.NET
请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我不经常检查它。如果您必须离线回复,请删除
NO SPAM
date format, like this:
where date >=#2004-03-01# and date <=#2004-03-31#
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"
这篇关于日期范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!