Suppose I have a variable which contains date value in a string format.
eg: declare @value1 varchar(50) = '2013-01-08 15:44:12.2081606 +05:30'
Now my question is, how will i come to know whether the @value1 containing the date value as shown above is of which type? and based on the type it should return null, 1 or 0.
for datetime and datetimeoffset it should return 1,
for date type it should return 0,
and if @value1 doesn't contain any value then it should return NULL.