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

Content with tag DateTime Rss

   Items 1 to 20 of 37    Older >>
 

Format Date Time Function

Function do return common datatime formats of a date. select dbo.[KDT_FN_FORMATDATETIME]('LASTDAY DDDD',getdate())   Read more...
By Kraai 2016/04/26 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 701 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 2016/04/13 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 2,380 reads

Datetime vs. Datetime2

Read a short comparison of datetime and datetime2 types. Learn about their structure, as well as the advantages and disadvantages of each.  Read more...
By Robert Hartmann 2016/01/05 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 12,609 reads

Calculate relative time

dynamically calculates a timestamp  Read more...
By Wilfred van Dijk 2015/09/30 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,365 reads

How to Get SQL Server Dates and Times Horribly Wrong

One of the times that you need things to go right is when you are doing analysis and reporting. This is generally based on time and date. A sure-fire way of getting managers upset is to get the figures horribly wrong by messing up the way that you handle datetime values in SQL Server. In the interests of peace, harmony and a long career in BI, Robert Sheldon outlines some of the worst mistakes you can make when using SQL Server dates.  Read more...
By Additional Articles 2015/06/08 | Source: SimpleTalk | Category: dates
Rating:  Rate this |   Briefcase | 6,444 reads

Calculating Duration Using DATETIME Start and End Dates (SQL Spackle)

It's an old problem with a solution that's nearly as old. SQL Server MVP Jeff Moden shows us the old trick mixed with a slick trick to format the duration as extended hours, minutes, seconds, and milliseconds.   Read more...
By Jeff Moden 2015/04/03 (first published: 2014/01/16) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 20,349 reads

The End

By Steve Jones 2014/12/31 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 1,986 reads

In The Beginning

By Sean Pearce 2014/11/25 | Category: datetime
Rating: (not yet rated) |  Discuss |   Briefcase | 1,873 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,299 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 2016/04/13 | Source: SQLServerCentral.com | Category: datetime
Rating: |  Discuss |   Briefcase | 2,380 reads

Finding “Active” Rows for the Previous Month (SQL Spackle)

SQL Server MVP Jeff Moden walks us through the classic problem of finding all the "Active" rows for the previous month using start and end dates. This is excellent for those new to T-SQL.  Read more...
By Jeff Moden 2014/01/30 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 6,369 reads

Calculating Duration Using DATETIME Start and End Dates (SQL Spackle)

It's an old problem with a solution that's nearly as old. SQL Server MVP Jeff Moden shows us the old trick mixed with a slick trick to format the duration as extended hours, minutes, seconds, and milliseconds.   Read more...
By Jeff Moden 2015/04/03 (first published: 2014/01/16) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 20,349 reads

Datetime conversion of empty string

By Gabe Tower 2013/11/25 | Category: datetime
Rating: (not yet rated) |  Discuss |   Briefcase | 2,179 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,625 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 | 24,555 reads

DATETIME - 4

By bitbucket-25253 2013/03/18 | Category: datetime
Rating: (not yet rated) |  Discuss |   Briefcase | 2,057 reads

DATETIME - 3

By bitbucket-25253 2013/03/11 | Category: datetime
Rating: (not yet rated) |  Discuss |   Briefcase | 1,896 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,594 reads

DATETIME 2

By bitbucket-25253 2012/08/02 | Category: datetime
Rating: (not yet rated) |  Discuss |   Briefcase | 2,728 reads

DATETIME 1

By bitbucket-25253 2011/12/07 | Category: datetime
Rating: (not yet rated) |  Discuss |   Briefcase | 2,271 reads
   Items 1 to 20 of 37    Older >>
 
Tags
t-sql (14)    
date manipulation (7)    
convert (4)    
function (4)    
date (3)    
cast (2)    
data warehousing (2)    
datawarehouse (2)    
datepart (2)    
dimensions (2)    
all columns (1)    
between (1)    
case (1)    
converter (1)    
date datatypes (1)    
datediff (1)    
datename (1)    
dates (1)    
datetime2 (1)    
duration (1)    
formatting (1)    
getdate() (1)    
len() (1)    
mask (1)    
precision (1)    
smalldatetime (1)    
sql spackle (1)    
string (1)    
style (1)    
substring (1)    
summer time (1)    
timestamp (1)    
tips & tricks (1)    
unix (1)