Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
techfortune
Starting Member
1 Post |
Posted - 2014-03-18 : 01:31:38
|
Dear sir,Please see below control panel statics, cp start_time stop_time2 15-03-2014 23:58 15-03-2014 23:571 16-03-2014 01:11 15-03-2014 23:572 16-03-2014 01:09 15-03-2014 23:583 15-03-2014 23:59 15-03-2014 23:59I want to write sql statement which will return result only for every 30 mins. For. example -SELECT id, CP,, Start_Time, Stop_Time FROM tablename WHERE (Stop_Time BETWEEN '2014-03-15 23:30:00.000' AND '2014-03-15 23:59:59.000')Please suggest asap.Regards,TFSTFS |
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2014-03-18 : 08:21:41
|
SELECT id, CP,, Start_Time, Stop_Time FROM tablenamewhere DATEDIFF(Minute, '2014-03-15 23:30:00.000', '2014-03-16 00:00:00.000')=30Javeed Ahmed |
|
|
|
|
|