• prabhu.st (12/14/2012)


    Hi,

    I have a xml like this.

    <DocumentElement>

    <tLockhistory>

    <lockrequesteddate>2012-12-14T00:00:00+05:30</lockrequesteddate>

    <lockexpirydate>2012-12-29T00:00:00+05:30</lockexpirydate>

    <createddate>2012-12-14T00:00:00+05:30</createddate>

    </tLockhistory>

    <tLockhistory>

    <lockrequesteddate>2012-12-14 00:00:00</lockrequesteddate>

    <lockexpirydate>2012-12-29 00:00:00</lockexpirydate>

    <createddate>2012-12-14 00:00:00</createddate>

    </tLockhistory>

    </DocumentElement>

    output is this.

    lockrequesteddate lockexpirydate

    ----------------------- -----------------------

    2012-12-13 18:30:00.000 2012-12-28 18:30:00.000

    2012-12-14 00:00:00.000 2012-12-29 00:00:00.000

    Note:

    first row is the one really passed from the XML,

    second row was added by me to check where is the issue.

    My Question is:

    How can I handle the XML date values, where the system reads a date value as a value which actually one day previous to the given date.

    any immediate suggestion would be a great help to me.

    Thanks in advance.

    The first time above is in UTC time. It is the time on the system expressed with an offset. If you add the offset to the time displayed (2012-12-13 18:30:00.000 + 5:30) that will be 2012-12-14 00:00:00.000.

    Other than that, I can't be much help as I am learning XML and XML processing myself.