• dinesh,

    I did not notice your message until this morning (when i get into this page accidently), because this article is not yet published. It is scheduled and will be out soon.

    You need to apply an 'XQuery' conversion before the value can be converted to a valid SQL Server datetime value. Use the function "xs:dateTime()" or "xs:date()" for the conversion. Here is an example.

    DECLARE

    @emp AS XML

    SET @emp = '

    <Employee EmployeeNumber="1001" Language="EN" >

    <FullName>Jacob</FullName>

    <Salary>10000</Salary>

    <Age>30</Age>

    <Married>1</Married>

    <BirthDate>1975-03-14T12:00:00+05:30</BirthDate>

    <ReportingTime />

    </Employee>

    '

    SELECT

    x.e.value('@EmployeeNumber[1]','varchar(20)') as EmpNumber,

    x.e.value('FullName[1]','varchar(40)') as FullName,

    x.e.value('xs:dateTime(BirthDate[1])', 'datetime') as BirthDate

    FROM

    @emp.nodes('Employee') x(e)

    .