Working with Time Spans and Durations in SQL Server
What is the best way to return the "duration" of an event in SQL, given the start and end datetime values? How can we add up these durations to return grand totals? What data types should be used to...
View ArticlePayment due date function
Calculates the nth due date for any given date, while accounting for weekends.
View ArticleUsing the DATE data type in SQL Server 2008
In SQL Server 2008 we get a new DATE date type that allows you to store a date without a time.
View ArticleNew datetime datatypes in SQL Server 2008
Older versions of SQL Server had only one datatype to store both the date and time values. In SQL Server 2008, Microsoft introduces a set of new datatypes that store date and time individually, and...
View ArticleDifferent Date Formats
You Can Find Some Date Functions and extracting the different Date Formats using the Convert and Cast
View ArticleGenerating Missing Dates and Numbers
Finding missing data in a sequence of numbers or dates is a common request of DBAs. Regular author Jacob Sebastian brings us a new article that shows just how you can do this. Save time when comparing...
View ArticleSQL Server 2008 New DATETIME DataTypes
This article is going to cover the newly introduced data types in SQL Server 2008 July CTP, and will specifically discuss the DATETIME functions.
View Articlefn_getDateAway - Calculates a date based upon arguments specified
Calculates a past or future date based upon supplied parameters. Returns a datetime
View ArticleSQL Server Function to Determine a Leap Year
I need to write a function to determine if particular year is a leap year (i.e. February contains 29 days rather than 28 days). I know that there are various rules for calculating leap years. Is there...
View ArticleTemporal Datatypes in SQL Server
In the first of a series of articles on the tricks of tackling temporal data in SQL, Joe Celko discusses SQL's temporal data types and agonizes over the fact that, although there are ANSI/ISO Standards...
View ArticleSQL Server 2008 T-SQL Enhancements Part - II
Continuing with his series on changes in SQL Server 2008, Arshad Ali takes a look at table enhancements and new data types.
View ArticleNth occurrence of a weekday in a month and year
To find date at nth occurrence of a weekday in a month and year
View ArticleFinancial Month
This Script will return the respective financial month(Starts from April to March) for a calander month Input(Starts from January to April), May use for many Consolidated Financial Reports.
View ArticleCalculating the Number of Business Hours Passed Since a Point of Time
A set of user defined functions used to calculate the number of business or working hours (excluding the non working hours) that have passed since a certain point of time.
View Article
More Pages to Explore .....