Niall Gallagher
Member since Jun 9, 2009
- Profile: /members/3571-niall-gallagher.htm
- Comments: 1
Recent Blog Comments By Niall Gallagher
-
Getting Only the Date Part of a Date/Time Stamp in SQL Server
Posted on Jun 9, 2009 at 10:12 AM
I'd recommend avoid strings entirely. select month(cast(convert(varchar,getdate(),105) AS datetime)), month(cast(convert(varchar,getdate(),101) AS datetime)) In my UK locale this returns 9 and 6 for the month values -- i.e. the month() function returns an incorrect value because the code converted... read more »