I have a bunch of product orders and I’m trying to group by the date and sum the quantity for that date. How can I group by the month/day/year without taking the time part into consideration?
3/8/2010 7:42:00
should be grouped with 3/8/2010 4:15:00
Advertisement
Answer
Cast/Convert the values to a Date
type for your group by.
GROUP BY CAST(myDateTime AS DATE)