Not logged in - Login


R
e
q
u
e
s
t

a

d
e
m
o
< back

CLR Reference: Date Of Birth

{TOC}

"Date Of Birth"

CLR function

<.CLRSQLCLR: function:

SELECT xxxxx(xxx,xxx,xxx)>[dbo].[DateOfBirthDynamic] (<@birthDate, datetime>, <@shiftDays, int>, <@shiftMonth, int>, <@shiftYears, int>)

Expected input

<.expecteddata: input:Valid datadatetime type,value shiftDays/daysShift: rule,acceptable sample>day range (Default is 15) shiftMonth/monthShift: acceptable month range (Default is 6) shiftYears/yearsShift: acceptable year range (Default is 5)

Expected output

<.expectedDatetime output:value datashifted type,to rule,random sample>delta days/months/years according to input ranges

Error handling

<.error handling>

Example

<.example>SQLCLR:

SELECT [dbo].[DateOfBirthDynamic] (CAST('01-JAN-2009' AS DATETIME), 1, 2, 1)

Download a Trial