Last day of previous monthApril 20, 2004
>>Script Language and Platform: SQL Server 2000 Author: MAK
create function dbo.LastDayofPreviousMonth (@date datetime)
returns datetime
as
--Author:MAK
--Objective: returns last day of previous month for a given date.
begin
declare @returndate datetime
set @returndate =convert(datetime,right('00'+convert(varchar(2),
Disclaimer: We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
"as -is", without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose...
Disclaimer Continued
Back to Database Journal Home |