Rahul Agrawal
10/17/2023, 1:42 AM{{#assign 'aDate'}} {{soapXPath request.body '/RealTimePriceDataWebService/reportBean/ReportBean/ParamValue/text()'}} {{/assign}}
Date from xpath : {{aDate}}
Date from xpath plus one day : {{date (parseDate aDate format="yyyy/MM/dd") offset='1 days'}}
Simple date : {{date}}
Simple now : {{now}}
Date from xpath plus one day : {{date (parseDate aDate format="yyyy/MM/dd") offset='1 days'}}
However the output that I get for the above is not as expected
Date from xpath : 21-Oct-2020
Date from xpath plus one day : 2023-10-18T01:36:39Z
Simple date : 2023-10-17T01:36:39Z
Simple now : 2023-10-17T01:36:39Z
Date from xpath plus one day : 2023-10-18T01:36:39Z
The request body is
<soapenv:Header/>
<soapenv:Body>
<cor:RealTimePriceDataWebService>
<cor:reportBean>
<java:ReportBean>
<java:ParamName>Date</java:ParamName>
<java:ParamValue>21-Oct-2020</java:ParamValue>
</java:ReportBean>
</cor:reportBean>
</cor:RealTimePriceDataWebService>
</soapenv:Body>
</soapenv:Envelope>
Instead of doing the offset on the date grabbed from xpath, the code seems to be doing an offset on the current date.
May I know what mistake am I doing .Lee Turner
10/17/2023, 8:11 AM{{#assign 'aDate'}} {{soapXPath request.body '/RealTimePriceDataWebService/reportBean/ReportBean/ParamValue/text()'}} {{/assign}}
Date from xpath : {{aDate}}
Date from xpath plus one day : {{date (parseDate aDate format="dd-MMM-yyyy") offset='1 days'}}
Simple date : {{date}}
Simple now : {{now}}
Date from xpath plus one day : {{date (parseDate aDate format="dd-MMM-yyyy") offset='1 days'}}
Date from xpath : 21-Oct-2020
Date from xpath plus one day: 2020-10-22T00:00: 00Z
Simple date: 2023-10-17T08: 09:55Z
Simple now: 2023-10-17T08: 09: 55Z
Date from xpath plus one day: 2020-10-22T00: 00:00Z
Rahul Agrawal
10/17/2023, 8:44 AMLee Turner
10/17/2023, 8:45 AM