Department_of_T
11 years agoContributor
Adding days to a date from a response
Hi
I have a X Path Assertion in which i am trying to add 1 Day to a date in a response file and verify it against a value in the database. I can easily validate the date if i use todays date
But when i try and add one day to the date in the response it fails. Can anyone help?
registrationExpiryDate is in the format dd/mm/yyy
I have a X Path Assertion in which i am trying to add 1 Day to a date in a response file and verify it against a value in the database. I can easily validate the date if i use todays date
${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss").format(new Date() +1)}
But when i try and add one day to the date in the response it fails. Can anyone help?
${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss").format(${findVehicleRegistrationRenewal - Request 1#Response#declare namespace ns0='licensing.transport.wa.gov.au'; //ns0:findVehicleRegistrationRenewalResponse[1]/findVehicleRegistrationRenewalResponse[1]/registrationExpiryDate[1]} +1)}
registrationExpiryDate is in the format dd/mm/yyy