Cool Tips‎ > ‎

Date and Time Manipulation

 

Title

Description

Applicability

 

Calculate Easter Sunday Date    

Most holiday days have fairly simple formulae.  Easter Sunday is different and really requires a function of its own.

 

2000, 2005, 2008, 2008R2, 2012

 

 

Create Master Calendar Table    

A daily calendar table with a huge number or pre-calculated calendar attributes, plus most North American Holidays.

 

2000, 2005, 2008, 2008R2, 2012

 

Time Zone Storage and Conversion

3 functions and a table to facilitate easy conversion of a date and time between time zones.  Includes provisions for DST.

 

2000, 2005, 2008, 2008R2, 2012

 

Date Ceiling Function

Rounds a date time up to the next whole second, minute, hour, day, month or year, as required 

 

2000, 2005, 2008, 2008R2, 2012

 

Date Floor Function

Rounds a date time down to the last whole second, minute, hour, day, month or year, as required

 

2000, 2005, 2008, 2008R2, 2012

 

Format DATETIME as String    

 

Changes a DATETIME parameter to the format  'Fri 22nd Jun 2012'.

 

2000, 2005, 2008, 2008R2, 2012

 

Convert Milliseconds to Hours and Minutes String

 

Converts #Milliseconds to a string of format '0000h 00m'.

 

2000, 2005, 2008, 2008R2, 2012

 

Calculate Common Date Ranges    

A function to calculate the start and end dates for common date ranges e.g. This Week, Last Month, Next Year

 

2000, 2005, 2008, 2008R2, 2012

 

Grouping/Counting by Dates

Examples of a simple technique for easy grouping of dates by second, minute, hour or day (and some points in between). 

 

2000, 2005, 2008, 2008R2, 2012

 

Generate Date Ranges

Examples of techniques used to generate sequential or random date or date/time sequences.

 

2000, 2005, 2008, 2008R2, 2012

 

 

 

Comments