Tip 11 : Group By Date for DateTime Type Field

You have a Purchase table with fields of ID, PurchaseAmount and PurchaseDate. The PurchaseDate field is DateTime type that includes Date and Time information. You want daily total purchase amount.

To implement this, you can do GROUP BY based on Date portion of the DateTime field.

No Comments