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

Share

Share

Rate