Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts with tag Date Rss

Search for any content tagged date

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add a script

   Items 1 to 12 of 12   
 

DynamicDateRangeGenerator

Generates # of dates in before/after current year. No more hardcoded date ranges.  Read more...
By Mitch Spruill 2016/08/08 | Source: SQLServerCentral.com | Category: dynamic
Rating: (not yet rated) |  Discuss |   Briefcase | 345 reads

Calculate Age (in years)

An inline table valued function (iTVF) that can be used to calculate age in years.  Read more...
By Alan Burstein 2016/04/27 | Source: SQLServerCentral.com | Category: date
Rating: |  Discuss |   Briefcase | 806 reads

Calendar Table Function

This iTVF will produce a calendar table that can be used for complex date manipulation; quickly and effeciently  Read more...
By Chris Kutsch 2016/08/02 | Source: SQLServerCentral.com | Category: calendar
Rating: |  Discuss |   Briefcase | 4,477 reads

Checking All Date Columns in a Table(s)

Find minimum and maximum values for all date columns in a table or range of tables, using a mask.  Read more...
By Larry Schmidt 2014/11/17 | Source: SQLServerCentral.com | Category: date
Rating: |  Discuss |   Briefcase | 1,309 reads

PivotByDate clr stored procedure

This script pivots 1 to N numeric columns, grouping by 1 to N (N)(Var)char columns, pivoting by distinct date.  Read more...
By Louis Nardozi 2013/10/30 | Source: SQLServerCentral.com | Category: pivot
Rating: (not yet rated) |  Discuss |   Briefcase | 1,043 reads

Function to format a datetime variable by a mask

I have used the following function to convert dates according to desired textual formats that were not immediately available in the standard styles on offer.  Read more...
By Colin Frame 2013/10/18 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 1,627 reads

Date Format

Returns your date in the format mask you require.  Read more...
By Ervin Santiago 2013/03/11 | Source: SQLServerCentral.com | Category: date
Rating: |  Discuss |   Briefcase | 2,010 reads

Calculate U.S. Holidays

This script runs off the Date Calendar table to flag is_workday when your business is closed for holiday.  Read more...
By Boyd Tyrrell 2011/07/01 | Source: SQLServerCentral.com | Category: holiday
Rating: |  Discuss |   Briefcase | 2,763 reads

Convert seconds to a timestring

This script converts a number of seconds (integer) to a time string, format 'hh:mm:ss'  Read more...
By Wilfred van Dijk 2010/05/05 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,386 reads

Date Calendar

Code to create a handy date calendar cross-reference table with a ton of pre-populated, slice-and-dice data field variations to aid in complex date parameterization / selection criteria.  Read more...
By Sean Smith 2016/01/01 | Source: SQLServerCentral.com | Category: date
Rating: |  Discuss |   Briefcase | 10,896 reads

Return X Day of Month

This function will return the first, second, third, fourth or last day of a given month.  Read more...
By Justin Wagner 2009/03/03 | Source: SQLServerCentral.com | Category: date
Rating: |  Discuss |   Briefcase | 1,133 reads

Function to Return Date and Time String for File Archiving

This function will return a string in sortable format YYYYMMDD-hhmmssnnn to append to file names for archiving.  Read more...
By Joshua A. Walker 2009/02/18 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 1,410 reads
   Items 1 to 12 of 12