rad
10 years agoOccasional Contributor
Validating a DateTime from a JSON response to Today's date
I have a testcase using a REST-JSON request. When ever I do a POST , it returns the dateCreated . Since this changes everytime I do a POST ,how do I validate this? Also the response is in JSOn format. The response is
"DateCreated":"2015-07-20T09:56:35.263"
Any help would be appreciated!
- You may use date format using SimpleDateFormat. And create a date using the same date format before the request is sent. And compare the resulting date which must always be greater than the request date.