|
本帖最后由 ly_16 于 2017-12-22 21:26 编辑
我想在一个时间段内然后按照间隔时间来查询数据
Sql = "select * from Float_Tag where 时间 between '" & CDate(StartDate) & "' and '" & CDate(StopDate) & "'And DateDiff( mi, + '" & CDate(StartDate) & "',时间) % " + "60" + "=0 "
其中StartDate和StopDate是DTPicker1控件,时间格式 2013-09-26 17:53:00,间隔时间选择"mi" 及“60”即60分钟,原本查询出来数据是:
2013-09-26 17:53:00
2013-09-26 18:53:00
2013-09-26 19:53:00
2013-09-26 20:53:00
2013-09-26 21:53:00
为什么查询出来数据是以下内容,多出类似2013-09-26 17:53:00与2013-09-26 18:53:00数据?
2013-09-26 17:53:00
2013-09-26 17:53:01
2013-09-26 17:53:02
2013-09-26 17:53:03
2013-09-26 17:53:04
2013-09-26 17:53:05
2013-09-26 17:53:06
2013-09-26 17:53:07
2013-09-26 17:53:08
2013-09-26 17:53:09
2013-09-26 17:53:10
2013-09-26 17:53:11
2013-09-26 17:53:12
2013-09-26 17:53:13
2013-09-26 17:53:14
2013-09-26 17:53:15
2013-09-26 17:53:16
2013-09-26 17:53:17
2013-09-26 17:53:18
2013-09-26 17:53:19
2013-09-26 17:53:20
2013-09-26 17:53:21
2013-09-26 17:53:22
2013-09-26 17:53:23
2013-09-26 17:53:24
2013-09-26 17:53:25
2013-09-26 17:53:26
2013-09-26 17:53:27
2013-09-26 17:53:28
2013-09-26 17:53:29
2013-09-26 17:53:30
2013-09-26 17:53:31
2013-09-26 17:53:32
2013-09-26 17:53:33
2013-09-26 17:53:34
2013-09-26 17:53:35
2013-09-26 17:53:36
2013-09-26 17:53:37
2013-09-26 17:53:38
2013-09-26 17:53:39
2013-09-26 17:53:40
2013-09-26 17:53:41
2013-09-26 17:53:42
2013-09-26 17:53:43
2013-09-26 17:53:44
2013-09-26 17:53:45
2013-09-26 17:53:46
2013-09-26 17:53:47
2013-09-26 17:53:48
2013-09-26 17:53:49
2013-09-26 17:53:50
2013-09-26 17:53:51
2013-09-26 17:53:52
2013-09-26 17:53:53
2013-09-26 17:53:54
2013-09-26 17:53:55
2013-09-26 17:53:56
2013-09-26 17:53:57
2013-09-26 17:53:58
2013-09-26 17:53:59
2013-09-26 18:53:00
2013-09-26 18:53:01
2013-09-26 18:53:02
2013-09-26 18:53:03
2013-09-26 18:53:04
2013-09-26 18:53:05
2013-09-26 18:53:06
2013-09-26 18:53:07
2013-09-26 18:53:08
2013-09-26 18:53:09
2013-09-26 18:53:10
2013-09-26 18:53:11
2013-09-26 18:53:12
2013-09-26 18:53:13
2013-09-26 18:53:14
2013-09-26 18:53:15
2013-09-26 18:53:16
2013-09-26 18:53:17
2013-09-26 18:53:18
2013-09-26 18:53:19
2013-09-26 18:53:20
2013-09-26 18:53:21
2013-09-26 18:53:22
2013-09-26 18:53:23
2013-09-26 18:53:24
2013-09-26 18:53:25
2013-09-26 18:53:26
2013-09-26 18:53:27
2013-09-26 18:53:28
2013-09-26 18:53:29
2013-09-26 18:53:30
2013-09-26 18:53:31
2013-09-26 18:53:32
2013-09-26 18:53:33
2013-09-26 18:53:34
2013-09-26 18:53:35
2013-09-26 18:53:36
2013-09-26 18:53:37
2013-09-26 18:53:38
2013-09-26 18:53:39
2013-09-26 18:53:40
2013-09-26 18:53:41
2013-09-26 18:53:42
2013-09-26 18:53:43
2013-09-26 18:53:44
2013-09-26 18:53:45
2013-09-26 18:53:46
2013-09-26 18:53:47
2013-09-26 18:53:48
2013-09-26 18:53:49
2013-09-26 18:53:50
2013-09-26 18:53:51
2013-09-26 18:53:52
2013-09-26 18:53:53
2013-09-26 18:53:54
2013-09-26 18:53:55
2013-09-26 18:53:56
2013-09-26 18:53:57
2013-09-26 18:53:58
2013-09-26 18:53:59
2013-09-26 19:53:00
2013-09-26 19:53:01
2013-09-26 19:53:02
2013-09-26 19:53:03
2013-09-26 19:53:04
2013-09-26 19:53:05
2013-09-26 19:53:06
2013-09-26 19:53:07
2013-09-26 19:53:08
2013-09-26 19:53:09
2013-09-26 19:53:10
2013-09-26 19:53:11
2013-09-26 19:53:12
2013-09-26 19:53:13
2013-09-26 19:53:14
2013-09-26 19:53:15
2013-09-26 19:53:16
2013-09-26 19:53:17
2013-09-26 19:53:18
2013-09-26 19:53:19
2013-09-26 19:53:20
2013-09-26 19:53:21
2013-09-26 19:53:22
2013-09-26 19:53:23
2013-09-26 19:53:24
2013-09-26 19:53:25
2013-09-26 19:53:26
2013-09-26 19:53:27
2013-09-26 19:53:28
2013-09-26 19:53:29
2013-09-26 19:53:30
2013-09-26 19:53:31
2013-09-26 19:53:32
2013-09-26 19:53:33
2013-09-26 19:53:34
2013-09-26 19:53:35
2013-09-26 19:53:36
2013-09-26 19:53:37
2013-09-26 19:53:38
2013-09-26 19:53:39
2013-09-26 19:53:40
2013-09-26 19:53:41
2013-09-26 19:53:42
2013-09-26 19:53:43
2013-09-26 19:53:44
2013-09-26 19:53:45
2013-09-26 19:53:46
2013-09-26 19:53:47
2013-09-26 19:53:48
2013-09-26 19:53:49
2013-09-26 19:53:50
2013-09-26 19:53:51
2013-09-26 19:53:52
2013-09-26 19:53:53
2013-09-26 19:53:54
2013-09-26 19:53:55
2013-09-26 19:53:56
2013-09-26 19:53:57
2013-09-26 19:53:58
2013-09-26 19:53:59
2013-09-26 20:53:00
2013-09-26 20:53:01
2013-09-26 20:53:02
2013-09-26 20:53:03
2013-09-26 20:53:04
2013-09-26 20:53:05
2013-09-26 20:53:06
2013-09-26 20:53:07
2013-09-26 20:53:08
2013-09-26 20:53:09
2013-09-26 20:53:10
2013-09-26 20:53:11
2013-09-26 20:53:12
2013-09-26 20:53:13
2013-09-26 20:53:14
2013-09-26 20:53:15
2013-09-26 20:53:16
2013-09-26 20:53:17
2013-09-26 20:53:18
2013-09-26 20:53:19
2013-09-26 20:53:20
2013-09-26 20:53:21
2013-09-26 20:53:22
2013-09-26 20:53:23
2013-09-26 20:53:24
2013-09-26 20:53:25
2013-09-26 20:53:26
2013-09-26 20:53:27
2013-09-26 20:53:28
2013-09-26 20:53:29
2013-09-26 20:53:30
2013-09-26 20:53:31
2013-09-26 20:53:32
2013-09-26 20:53:33
2013-09-26 20:53:34
2013-09-26 20:53:35
2013-09-26 20:53:36
2013-09-26 20:53:37
2013-09-26 20:53:38
2013-09-26 20:53:39
2013-09-26 20:53:40
2013-09-26 20:53:41
2013-09-26 20:53:42
2013-09-26 20:53:43
2013-09-26 20:53:44
2013-09-26 20:53:45
2013-09-26 20:53:46
2013-09-26 20:53:47
2013-09-26 20:53:48
2013-09-26 20:53:49
2013-09-26 20:53:50
2013-09-26 20:53:51
2013-09-26 20:53:52
2013-09-26 20:53:53
2013-09-26 20:53:54
2013-09-26 20:53:55
2013-09-26 20:53:56
2013-09-26 20:53:57
2013-09-26 20:53:58
2013-09-26 20:53:59
2013-09-26 21:53:00
2013-09-26 21:53:01
2013-09-26 21:53:02
2013-09-26 21:53:03
2013-09-26 21:53:04
2013-09-26 21:53:05
2013-09-26 21:53:06
2013-09-26 21:53:07
2013-09-26 21:53:08
2013-09-26 21:53:09
2013-09-26 21:53:10
2013-09-26 21:53:11
2013-09-26 21:53:12
2013-09-26 21:53:13
2013-09-26 21:53:14
2013-09-26 21:53:15
2013-09-26 21:53:16
2013-09-26 21:53:17
2013-09-26 21:53:18
2013-09-26 21:53:19
2013-09-26 21:53:20
2013-09-26 21:53:21
2013-09-26 21:53:22
2013-09-26 21:53:23
2013-09-26 21:53:24
2013-09-26 21:53:25
2013-09-26 21:53:26
2013-09-26 21:53:27
2013-09-26 21:53:28
2013-09-26 21:53:29
2013-09-26 21:53:30
2013-09-26 21:53:31
2013-09-26 21:53:32
2013-09-26 21:53:33
2013-09-26 21:53:34
2013-09-26 21:53:35
2013-09-26 21:53:36
2013-09-26 21:53:37
2013-09-26 21:53:38
2013-09-26 21:53:39
2013-09-26 21:53:40
2013-09-26 21:53:41
2013-09-26 21:53:42
2013-09-26 21:53:43
2013-09-26 21:53:44
2013-09-26 21:53:45
2013-09-26 21:53:46
2013-09-26 21:53:47
2013-09-26 21:53:48
2013-09-26 21:53:49
2013-09-26 21:53:50
Sql = "select * from Float_Tag where 时间 between '" & CDate(StartDate) & "' and '" & CDate(StopDate) & "'And DateDiff( mi, + '" & CDate(StartDate) & "',时间) % " + "60" + "=0 "
语句有问题?请各位高手帮忙诊断下,谢谢!!
|
|