# How to validate the excel date format with Postman response date format

**URL:** <https://community.postman.com/t/how-to-validate-the-excel-date-format-with-postman-response-date-format/38588>\
**Category:** Help Hub\
**Tags:** tests, moment\
**Created:** [August 26, 2022, 5:31am UTC](https://community.postman.com/t/how-to-validate-the-excel-date-format-with-postman-response-date-format/38588 "2022-08-26T05:31:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [October 19, 2022, 11:58am UTC](https://community.postman.com/t/how-to-validate-the-excel-date-format-with-postman-response-date-format/38588/2 "2022-10-19T11:58:01Z")

</div>

This is a JavaScript issue rather than postman.

Search Google for JavaScript date conversion.

Postman does have the moment library available, so I would look that up as well.

To do a comparison you need both dates in the same format. I would recommend using the moment library to convert the dates to a number using the format yyyymmdd (no hyphens or spaces) as technically it’s just a number comparison after this.

It might be worth looking at the following which is another topic related to dates.

[How to verify if ISO date on a endDate endPoint is not expired - Just getting started - Postman](https://community.postman.com/t/how-to-verify-if-iso-date-on-a-enddate-endpoint-is-not-expired/39628)

---

_[View the full topic](https://community.postman.com/t/how-to-validate-the-excel-date-format-with-postman-response-date-format/38588)._
