有人告诉我如何使用C#.NET在两个日期范围之间显示数据 [英] ANY ONE TELL ME HOW TO DISPLAY DATA BETWEEN TWO DATE RANGES USING C#.NET
本文介绍了有人告诉我如何使用C#.NET在两个日期范围之间显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人告诉我如何使用C#.NET在两个日期范围之间显示数据
我使用CRYSTAL报表和BAKEND我有SQLSERVER 2000
ANY ONE TELL ME HOW TO DISPLAY DATA BETWEEN TWO DATE RANGES USING C#.NET
M USING CRYSTAL REPORTS AND AT BAKEND I HAVE SQLSERVER 2000
推荐答案
您的大写锁定键似乎已损坏.你应该看一下.
您使用SQL.基本的入门级SQL.也许您需要一本有关SQL的书.
从myTable中选择*,其中date> @dateMin和theDate< @dateMax
It appears your caps lock key is broken. You should get that looked at.
You use SQL. Basic, entry level SQL. Perhaps you need a book on SQL.
select * from myTable where theDate > @dateMin and theDate < @dateMax
这是一个非常具体的问题,因此您将获得一个不具体的答案.
假设:
0)您知道范围的开始日期或结束日期
1)您知道范围有多远
2)您不必担心时间部分
This is a pretty non-specific question, so you''re going to get a non-specific answer.
Assumtions:
0) You know either the starting date or ending date of the range
1) You know how long the range is
2) You''re not worried about the time component
DateTime start = new DateTime(2010,1,1);
DateTime end = new DateTime(start.Ticks).AddDays(30);
//to go backwards in time
end = end.AddDays(-30)
现在您有两个日期有疑问,您可以对它们进行任何操作...
Now that you have the two dates in question, you can do whatever you want with them...
这篇关于有人告诉我如何使用C#.NET在两个日期范围之间显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文