in

jetlounge

the minty fresh blog that whitens your teeth!
All Tags » SQL (RSS)

Browse by Tags

Sorry, but there are no more tags available to filter with.

    T-SQL: Get the Week Number of a Calendar Quarter

    December 12, 2007
    A little more code in this function than the week number of month function. You can substitute the beginning quarter dates for something custom...like an Accounting Period for instance. declare @p_date smalldatetime set @p_date = '5/15/2007' --or any date you like select CASE WHEN datepart (...

T-SQL: Get the Week Number for a Given Month

December 11, 2007
This function is fairly simple. Pass in a date and we return the Week # of the month. Generally this is 1 -5. In a rare case, like April 2006, this may stretch to 6. It can be customized for custom calendars. declare @p_date smalldatetime set @p_date = '5/15/2007' --or any date you like select...
Page 1 of 1 (2 items)


Powered by Community Server (Non-Commercial Edition), by Telligent Systems