3 Replies Latest reply on Apr 3, 2012 2:23 PM by user12679330

    incrementing date part from a given dateandTime value.


      I have a requirement where in I will get a date value from a

      declare namespace xf = "http://tempuri.org/";
      declare namespace ns0 = "http://www.domain.com/A";
      declare namespace s01 = "http://www.domain.com/B";
      declare namespace ns1 = "http://www.domain.com/C";

      declare function xf:input_to_reeive($abc as element(ns0:rootelement))
      as element(s01:MainStatus) {
      <s01:uniqueId>{ data($abc/ns1:header/ns1:id) }</s01:uniqueId>
      <s01:createdDate>{ data($abc/ns1:header/ns1:createdTime) }</s01:createdDate>
      <s01:expiryDate>xf:expiryDate(data($abc/ns1:header/ns1:createdTime))</v01:expiryDate> // this functionality is what expected.

      declare variable $abc as element(ns0:rootelement) external;


      in the above xquer I have tupdate the expiryDate as, reading the value from the createdTime, i have to increment the date value as +1.

      suppose my input is having for this data($abc/ns1:header/ns1:createdTime) as *2009-08-01T10:10:10*
      I have to update the expiryDate as *2009-08-02T10:10:10* (exactly 24 hours later for/from the creation time value).

      Could you please advice how i can do this, in the same xquery function above shown, adding another function to it and calling it from the expiryDate element to get the increment date value.


      Edited by: user12679330 on 03-Apr-2012 05:53

      Edited by: user12679330 on 03-Apr-2012 06:07

      Edited by: user12679330 on 03-Apr-2012 06:10

      Edited by: user12679330 on 03-Apr-2012 06:10