T-SQL reference › FORMAT dates
FORMAT dates in SQL Server
FORMAT makes dates look like “31 Oct 2026”. It is easy and it is not cheap. For grouping and filtering, keep a real date or CONVERT to yyyy-mm.
For the email, not the GROUP BY
SELECT FORMAT(order_date, 'dd MMM yyyy') AS nice,
CONVERT(char(10), order_date, 23) AS iso
FROM Orders;
Group with CONVERT or DATEFROMPARTS, then FORMAT only in the last SELECT if someone insists on “Oct 2026” in the grid. See group by month.
Try it on Harbour & Co
Amy Nair (Finance Lead) needs this now: “Monthly revenue for the finance pack, shipped orders only. Oldest month first.” Write the query, run it, send the results. On the paid plan.
Take the ticket →Learn it on a real ticket
Monday is free on WorkSQL. A colleague’s ticket lands, you write the T-SQL, we mark it. No videos. Five minutes.
Clock in free See Monday’s tickets