Discussion Locked
0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to group a date Range result set of say one month into days between 22:00:00 and 21:59:59. I's this possible with SQL or do I have to do it in my .NET application?
4 replies
try this:
SELECT * FROM yourTbl WHERE [date] BETWEEN 'startdate' AND 'enddate'
by bop_zw
That will return a result set that is NOT grouped! My problem is how do I group records of the same date but different times?
I hope you're reading these you semm to have sacttered this question all over the place.
Depends on what dbms and mind spotty memory but
Select DatePart(Day,MydateField) DayNo, Sum(Value)
From MyTable
Group By DayNo
or something close should do the trick
by itpreneur
select day(vardate) from table
where vardate between
startdate and enddate
group by day(vardate)
order by day
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
1 helpful
10 replies
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies
Discussion Locked
Best Ways to Improve Website Visibility
0 helpful
5 replies