Get Current Month Last Date [SQL]:
Create function [dbo].[fun_GetCurrentMonthLastDate]() Returns DateTime As
Begin DECLARE @returnDate DATETIME Set @returnDate = CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getDate()))),DATEADD(mm,1,getDate())),101) return @returnDate End
|
| Author: Prashant Mishra 17 Sep 2009 | Member Level: Bronze Points : 0 |
Good One!!! Can you explain this code???
|