UFN_STEWARDSHIPPLANSTEP_VALIDTIMES

Validates the stewardship start and end times.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@STARTTIME UDT_HOURMINUTE IN
@ENDTIME UDT_HOURMINUTE IN

Definition

Copy


        create function dbo.UFN_STEWARDSHIPPLANSTEP_VALIDTIMES
        (
            @STARTTIME UDT_HOURMINUTE = null,
            @ENDTIME UDT_HOURMINUTE = null
        )
        returns bit with execute as caller
        as
        begin    

            if (@STARTTIME is null or @STARTTIME = '') and (@ENDTIME is not null and @ENDTIME <> '')
            begin
                return 0;
            end

            if @STARTTIME > @ENDTIME 
            begin
                return 0;
            end

            return 1;
        end