SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Content with tags T-SQL, Date Manipulation Rss

   Items 1 to 20 of 78    Older >>
 

Bones of SQL – Grouping By User-Defined Calendar Periods

Although it is common to group by periods such as Week, Month, or Quarter, sometimes alternative periods are needed. This simple technique lets you split a year into periods with any number of days.  Read more...
By Bob Hovious 2017/12/08 (first published: 2016/09/26) | Source: SQLServerCentral.com | Category: date manipulation
Rating: |  Discuss |   Briefcase | 2,132 reads

Fun with Dates

By Steve Jones 2017/10/27 | Category: coalesce
Rating: (not yet rated) |  Discuss |   Briefcase | 1,071 reads

FORMATting dates

By Steve Jones 2017/10/24 | Category: format()
Rating: (not yet rated) |  Discuss |   Briefcase | 935 reads

The Current Date

By Steve Jones 2017/07/25 | Category: date manipulation
Rating: (not yet rated) |  Discuss |   Briefcase | 1,002 reads

Bones of SQL – Grouping By User-Defined Calendar Periods

Although it is common to group by periods such as Week, Month, or Quarter, sometimes alternative periods are needed. This simple technique lets you split a year into periods with any number of days.  Read more...
By Bob Hovious 2017/12/08 (first published: 2016/09/26) | Source: SQLServerCentral.com | Category: date manipulation
Rating: |  Discuss |   Briefcase | 2,132 reads

The Bones of SQL - The Holiday Table

This second part to a previous article on Calendar table generation shows how to create a holiday table containing both fixed-date and variable-date holidays.  Read more...
By Bob Hovious 2016/09/19 | Source: SQLServerCentral.com | Category: calendar
Rating: |  Discuss |   Briefcase | 2,655 reads

Bones of SQL

Learn how to use a calendar table to make your reporting queries much simpler.  Read more...

A Scary Day

By Steve Jones 2016/05/13 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 1,836 reads

Finding the quarter

By Steve Jones 2016/02/22 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 1,576 reads

It's the end of the year

By Steve Jones 2015/12/31 | Category: date manipulation
Rating: (not yet rated) |  Discuss |   Briefcase | 1,729 reads

Job Schedules

By Steve Jones 2015/11/10 | Category: sql agent
Rating: (not yet rated) |  Discuss |   Briefcase | 1,590 reads

DY

By Steve Jones 2015/11/06 | Category: date manipulation
Rating: (not yet rated) |  Discuss |   Briefcase | 1,618 reads

The First Day

By Steve Jones 2015/01/01 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,313 reads

Get month days

Gets the number of days in a month  Read more...
By Igor Micev 2014/11/10 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,251 reads

Calculate gregorian easter sunday using a table valued function

Calculate gregorian easter sunday using a table valued function.  Read more...
By Robin Langell 2014/09/03 | Source: SQLServerCentral.com | Category: easter sunday
Rating: |  Discuss |   Briefcase | 657 reads

On Handling Dates in SQL

The handling of dates in TSQL is complex - when SQL Server was Sybase, it was forced by the lack of prevailing standards in SQL to create its own ways of processing and formatting dates and times. Joe Celko looks forward to a future when it is possible to write standard SQL date-processing code with SQL Server.  Read more...
By Additional Articles 2014/03/21 | Source: SimpleTalk | Category: date manipulation
Rating:  Rate this |   Briefcase | 7,110 reads

Calendar Tables II - The Anchor

Show the results for a date even if there is no data.  Read more...
By Todd Fifield 2014/02/21 (first published: 2010/08/16) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 15,483 reads

Calendar Tables

Learn how to avoid complex date calculations and increase performance using calendar tables in this article from Todd Fifield.  Read more...
By Todd Fifield 2014/02/14 (first published: 2010/07/15) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 40,124 reads

How to Compare Rows within Partitioned Sets to Find Overlapping Dates

How to Compare Rows within Partitioned Sets to Find Overlapping, Contiguous, or Gap dates  Read more...
By Kevin Wu 2013/12/25 (first published: 2010/10/11) | Source: SQLServerCentral.com | Category: cte
Rating: |  Discuss |   Briefcase | 7,062 reads

Group Islands of Contiguous Dates (SQL Spackle)

Fill in another bit of your T-SQL knowledge by learning how to quickly group ranges of contiguous dates without RBAR.  Read more...
By Jeff Moden 2013/10/04 (first published: 2010/12/07) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 16,702 reads
   Items 1 to 20 of 78    Older >>
 
Tags
datetime (5)    
humor (3)    
sql spackle (2)    
tally table (2)    
aggregates (1)    
between (1)    
blogs (1)    
calendar (1)    
case (1)    
coalesce (1)    
convert (1)    
cte (1)    
date (1)    
date conversion (1)    
date data types (1)    
dateadd (1)    
datediff (1)    
datepart (1)    
easter sunday (1)    
emonth (1)    
fall on friday (1)    
format() (1)    
group by (1)    
holidays (1)    
modulus (1)    
msdb (1)    
next 13th (1)    
nth occurance of day in a month/year (1)    
partitioned sets (1)    
recursion (1)    
round() (1)    
row_number() (1)    
scripts (1)    
set dateformat (1)    
sql agent (1)    
sql server 2012 (1)    
sql server 7 (1)    
table valued function (tvf) (1)    
user defined function (udf) (1)