Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time difference in Calendar Month
Message
 
 
To
08/03/2004 08:36:51
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00884020
Message ID:
00884023
Views:
12
Hi Carolyn,

Can you use DATEPART(mm, datetimevalue) ?

>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?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform