问题排序日期 [英] Problem Sorting Dates

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

问题描述

我做了一个查询,其中第一列拉了一个日期字段。我希望查询中的列按升序日期排序。我已经确认实际表格中字段的格式设置为短日期。但是,当执行查询时,我得到:


10/12/2006

9/6/2006

9/7/2006


而不是:


9/6/2006

9/7/2006

10/12/2006


问题随之而来我的报告。


如何使报告像第二个例子一样出现?

I made a query where the first column pulls a date field. I want the column in the query to sort by ascending date. I have confirmed that the format of the field in the actual table is set as ''Short Date.'' However, when the query is executed I get:

10/12/2006
9/6/2006
9/7/2006

instead of:

9/6/2006
9/7/2006
10/12/2006

The problem then carries over to my report.

How do I make it so the report will come out like the second example?

推荐答案

在Design中打开报告查看,在视图选项卡下选择排序和分组。

将日期字段的名称放在归档/表达式下

在排序顺序下选择升序


希望这有帮助


Dale
Open the report in Design View, Under the View Tab select Sorting and Grouping.
Put the name of your date field under Filed/Expression
Select Ascending under Sort Order

Hope this helps

Dale


首先,确保查询以Date格式输出Date数据。

其次,通过报告设计中的排序和分组组织报告的排序。


如果您发布SQL,我们可以看到是否有任何明显的问题。
Firstly, ensure that the query outputs the Date data in a Date format.
Secondly, organise the sorting for the report via ''Sorting and Grouping'' within the Report design.

If you post your SQL we can see if there are any obvious problems.


感谢您的回复。但是,我仍然没有得到我需要的输出。我相信以正确的日期格式输出查询是对问题所在。你说SQL可能会有所帮助。


我实际上正在使用嵌套查询。第一个查询是:


SELECT DISTINCTROW格式
Thank you for both of your replies. However, I am still not getting the output I need. I believe the commend about the query outputing in the correct date format is where the problem lies. You said that the SQL might help.

I am actually working with a nested query. The first query is:

SELECT DISTINCTROW Format


这篇关于问题排序日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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