e
q
u
e
s
t
a
d
e
m
o < back
CLR Reference: Date Of Birth
{TOC}
"Date Of Birth"
CLR function
SQLCLR:
SELECT [dbo].[DateOfBirthDynamic] (<@birthDate, datetime>, <@shiftDays, int>, <@shiftMonth, int>, <@shiftYears, int>)
Expected input
data:Data: Valid datetime value
shiftDays/daysShift: acceptable day range (Default is 15)30)
shiftMonth/monthShift: acceptable month range (Default is 6)0)
shiftYears/yearsShift: acceptable year range (Default is 5)0)
Expected output
Datetime value shifted to random delta days/months/years according to input ranges
Error handling
<.error handling>
Example
SQLCLR:
SELECT [dbo].[DateOfBirthDynamic] (CAST('01-JAN-2009' AS DATETIME), 1,30, 2,0, 1)0)