Forum Discussion

rad's avatar
rad
Occasional Contributor
10 years ago

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...
  • nmrao's avatar
    10 years ago
    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.