Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts with tag DateTime Rss

Search for any content tagged datetime

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 13 of 13   
 

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,083 reads

Datetime Formats

This stored procedure will show all possible datetime formats when used with the style argument in the CONVERT() function. It also shows sample output from the date part arguments.  Read more...
By Doug Deneau 2014/10/28 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 1,452 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,571 reads

Converting to datetime a char field with several possible date formats

Converting to datetime a char field having several possible date formats  Read more...
By Federico Iori 2013/02/21 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,505 reads

TSQL fast unix timestamp conversion

How to convert Unix timestamp into datetime taking into account also summer or winter time  Read more...
By Federico Iori 2011/12/02 | Source: SQLServerCentral.com | Category: timestamp
Rating: |  Discuss |   Briefcase | 452 reads

How long has passed since SQL Server service started?

Days, hours and minutes since SQL Server service was started  Read more...
By Lars Søe Mikkelsen 2010/11/05 | Source: SQLServerCentral.com | Category: getdate()
Rating: |  Discuss |   Briefcase | 2,274 reads

datetime precision

Accuracy and precision go hand-in-hand. This script helps trim date values to whatever size is stored in a table's column.  Read more...
By William Talada 2010/01/20 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 1,090 reads

What were the dates of all the Fridays in this quarter?

This script displays list of all dates of all Fridays of this quarter.  Read more...
By Ashka Modi 2009/08/25 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 1,028 reads

GetDateTime Function

This function gets a variable string and converts to DateTime format 'YYYY-MM-DD HH:MM' Ex. '200907111405' Convert to '2009-07-11 14:05:00'   Read more...
By Luis Atondo 2009/07/30 | Source: SQLServerCentral.com | Category: convert
Rating: |  Discuss |   Briefcase | 1,047 reads

GetDateTimeString Function

This function gets a variable and converts to DateTime format string 'YYYYMMDDHHMM' Ex. '07/11/2009 2:05 PM' Convert to '200907111405'  Read more...
By Luis Atondo 2009/07/31 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 904 reads

Functions for using the keys from the Date and Time Dimensions

Three functions for obtaining the date and time dimension keys with a date or the date from the keys  Read more...
By Joshua A. Walker 2011/05/03 | Source: SQLServerCentral.com | Category: data warehousing
Rating: |  Discuss |   Briefcase | 4,265 reads

Date and Time dimension creation and population T-SQL

Dim_Date and Dim_Time. Date and Time dimensions. Creation, population with holidays, indexing and use script.  Read more...
By Joshua A. Walker 2013/10/04 | Source: SQLServerCentral.com | Category: data warehousing
Rating: |  Discuss |   Briefcase | 23,121 reads

Get DATE part of the DATETIME

A quick and elegant way to obtain date part of the datetime values  Read more...
By Jano Petras 2011/06/14 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 5,798 reads
   Items 1 to 13 of 13