UFN_PHONE_VALIDDATES
Checks to see if the start and end dates for a phone number are valid.
Return
| Return Type |
|---|
| bit |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @STARTDATE | date | IN | |
| @ENDDATE | date | IN |
Definition
Copy
create function dbo.UFN_PHONE_VALIDDATES
(
@STARTDATE date = '',
@ENDDATE date = ''
)
returns bit with execute as caller
as
begin
if (@STARTDATE is not null) and (@STARTDATE <> '')
begin
if (@ENDDATE is null) or (@ENDDATE = '')
set @ENDDATE = @STARTDATE
if @STARTDATE <= @ENDDATE
return 1
else
return 0
end
return 1
end