calculating how many days remaining in a month or last day of month or any other scenarios

calculating how many days remaining in a month or last day of month or any other scenarios:
declare @numberOfDaysInMonth int;

set @numberOfDaysInMonth = DAY(DATEADD (m, 1, DATEADD (d, 1 - DAY(getdate()), getdate())) - 1);

Comments

Popular posts from this blog

IBM FileNet: Bulk Processing using JavaScript

ASP.NET Web API Tutorial for Beginners

DB2 Date Time Functions