||If you have a table with Start Date and End Date Fields than you might want to find out how many of these days are included within specific date range.
||If I have several milestones I might want to know how many of my milestone days are between now and the next 30 days (We will post Utilization Function example soon). Another example is when let say I have a property to rent and I have several enquiries and I want to find properties which are suitable for the enquiry.
||There are 4 parameters:
Start Date and End Date (row level), StartingPoint (today's date for instance) and number of days.
Below is the function code:
-- Author: Emil Glownia
-- Create date: One day in 2007
CREATE FUNCTION [dbo].[udfNumberOfDaysInRange]
DECLARE @Result AS INT
To get full access to this page
Become a member or Sign in
Membership is just $3.99/month