Home Forums Article Discussions Article Discussions by Author Discuss content posted by ~~Hari.Bagra Function to calculate Month End Date RE: Function to calculate Month End Date
Lynn Pettis
SSC Guru
Points: 442467
More actions
February 5, 2008 at 4:42 pm
#775376
Here is another way to do it:
CREATE Function GetMonthEnd(@Date DateTime)
Returns DateTime
AS
Begin
Return (dateadd(mm, datediff(mm, 0, @Date) + 1, 0) - 1)
End