Quantcast
Channel: SQLServerCentral.com Content tagged datetime manipulation
Browsing latest articles
Browse All 25 View Live

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 Article



Payment due date function

Calculates the nth due date for any given date, while accounting for weekends.

View Article

Using 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 Article

New 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 Article

Different Date Formats

You Can Find Some Date Functions and extracting the different Date Formats using the Convert and Cast

View Article


Image may be NSFW.
Clik here to view.

Generating 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 Article

SQL 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 Article

fn_getDateAway - Calculates a date based upon arguments specified

Calculates a past or future date based upon supplied parameters. Returns a datetime

View Article


SQL 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 Article


Temporal 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 Article

SQL 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 Article

Nth occurrence of a weekday in a month and year

To find date at nth occurrence of a weekday in a month and year

View Article

DateTime Trick

View Article


Datetime precision

View Article

Financial 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 Article


DateTime Puzzle

View Article

New Year's Math

View Article


Deterministic

View Article

DateTime data types

View Article

Calculating 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

TIME Datatype

View Article


Just the time, please

View Article


Date fun

View Article

Fun Data Arithmetic

View Article
Browsing latest articles
Browse All 25 View Live




Latest Images