Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time difference in Calendar Month
Message
From
08/03/2004 08:36:51
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Time difference in Calendar Month
Miscellaneous
Thread ID:
00884020
Message ID:
00884020
Views:
52
I am trying to create a procedure that shows the time difference between 2 dates. I can do this using datediff or dateadd functions, but I need to band the output in calendar months.

Examples below:

Date1 = 29th February 2004
Date2 = 30th January 2004

Date 2 would need to appear in the 2nd month banding, but by using dateadd I get this in the 1st month banding.

Does anyone know how to do this?
Next
Reply
Map
View

Click here to load this message in the networking platform