日期查询跨越2年 [英] Date query spanning 2 years

查看:58
本文介绍了日期查询跨越2年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,


我正在使用Access 2007,并使用以下代码返回下周值的查询:

展开 | 选择 | Wrap | 行号

解决方案

看起来它只能起作用,因为大多数它从未经过测试。一年中最后一周的处理不仅笨拙。你能用英语准确指出你希望它提供什么吗?


HI,


查询完全根据Access Help''编写s查询标准的例子。我需要它来返回本周之后一周内的任何记录。


谢谢,

杰夫


@ jmar93


对不起杰夫,但是如果这是真的,你就不会有一年内比较一周的代码和一年的代码值。我不知道你认为你在这里有什么,但肯定不是这样。


至于你需要它做什么,你能更明确一点吗?你所说的你想要的甚至不是这个单位。你要求一个布尔值(真/假)值,但这会返回自特定日期以来的几周。


我只有在清楚地了解到什么是必需的。

HI,

I am using Access 2007 and have a query that returns values for the next week using the following code:

Expand|Select|Wrap|Line Numbers

解决方案

It looks like it only ever worked because most of it has never been tested. The handling of the last week in a year is more than clumsy. Can you specify in English exactly what you hope for it to provide?


HI,

The query is written exactly according to Access Help''s "examples of query criteria". I need it to return any records that fall in the week following the current week.

thanks,
Jeff


@jmar93
I''m sorry Jeff, but if that were true you wouldn''t have code comparing a week number within a year, with a year value. I don''t know what you think you have here but it''s certainly not that.

As for what you need it to do, can you be a little more explicit. What you say you want is not even the same unit as this returns. You ask for a boolean (True / False) value, but this returns a number of weeks since a particular date.

I can only help if I have a clear understanding of exactly what is required.


这篇关于日期查询跨越2年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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