Technical Article

Script to get the number of days in a month 1

,

I prefer use only SQL calendar.

create function f_days_in_month_1 (@date datetime) returns tinyint

   with encryption

as

begin
   return( day( dateadd(mm,1,@date - day(@date) + 1)- 1))
end

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating