# Compare data of the same response

**URL:** <https://community.postman.com/t/compare-data-of-the-same-response/40432>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [October 25, 2022, 2:05pm UTC](https://community.postman.com/t/compare-data-of-the-same-response/40432 "2022-10-25T14:05:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 25, 2022, 8:12pm UTC](https://community.postman.com/t/compare-data-of-the-same-response/40432/2 "2022-10-25T20:12:18Z")

</div>

Hi @shaga85

Have a look at this, it should give you what you need;

> [@How to verify if ISO date on a endDate endPoint is not expired](https://community.postman.com/t/how-to-verify-if-iso-date-on-a-enddate-endpoint-is-not-expired/39628/2):
>
> Consider the following. (I’m just working with the date, you will have to extend the code if you want the time stamp). You need the date format to be consistent to do the assertion. So first step is to create two variables with the same format for the comparison. Moment also creates a string, so you need to parse it to a number. I’ve set the format to YYYYMMDD as its just a number comparison then. Pretty sure you can do date comparison if you format the variable as a date object correctly…

---

_[View the full topic](https://community.postman.com/t/compare-data-of-the-same-response/40432)._
