XploreDotNet
Known Is A Drop,UnKnown Is An Ocean....
Njoy Programming
Saturday, May 16, 2015
Sql Server order by month name
Following Script will order the result in actual calendar month order.
SELECT
*
FROM
[dbo]
.
[tablename]
ORDER
BY
DATEPART
(
mm
,
CAST
(
[DateFieldColumnName]
+
' 1900'
AS
DATETIME
))
ASC
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
Loading...