Before thinking this is a duplicate please read.
I have been reading through the posts here and elsewhere but cannot figure out why the date is coming out invalid in the first place.
I am using SoapUI Pro to make calls and have placed in the XML that submits some code reference in order to create dates in the past but I need them to be relative to today not something that will be in the future or distant past so I have used the following
${=import java.text.SimpleDateFormat;
new SimpleDateFormat("YYYY-MM-DD").format(new Date()-6);}
When I submit my call to the Web Service I get back this error.
'2016-02-32' is not a valid value for 'date'
Can someone please explain why this is occurring? and what am I needing to correct this?
Ultimately I need to be able to do two things.
- Create a date in the format of YYYY-MM-DD 6 days in the past
- Create a date time in the format of YYYY-MM-DD HH:mm:ss.SSSXXX
Greatly appreciate some assistance on this. Am I not to use the Date? I have seen some that are using the Calendar and new references to Java 8, it is just a time crunch thing this morning and I did not want to go down any rabbit holes to track possible things that may be an issue as the servers are not using Java 8 at this time.