Viewing 4 posts - 1 through 4 (of 4 total)
This one will do the trick with just three instructions (and no string conversions which are best avoided):
SELECT
"LastDayOfMonth" = DatePart(day, DateAdd(month, DateDiff(month, -1, GetDate()), -1))
May 10, 2011 at 4:54 am
Won't the query cost for
select dbo.datefloor(getdate(),'dd')
be a lot higher than say
select convert(datetime, convert(char(10), getdate(), 120))
?
November 17, 2010 at 12:13 am
SELECT [alias] FROM [master].[dbo].[syslanguages]
Or you can use lcid if you modify the procedure slightly.
April 29, 2008 at 12:38 am
Very nice indeed, except maybe that the week numbers are incorrect, or at least does not comply with the internationell standard ISO 8601 (1972). For example, the year 2006 week...
April 25, 2008 at 1:38 am
Viewing 4 posts - 1 through 4 (of 4 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy