# Check format date with Postman

**URL:** <https://community.postman.com/t/check-format-date-with-postman/28359>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [October 2, 2021, 4:08pm UTC](https://community.postman.com/t/check-format-date-with-postman/28359 "2021-10-02T16:08:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [October 3, 2021, 12:02am UTC](https://community.postman.com/t/check-format-date-with-postman/28359/2 "2021-10-03T00:02:43Z")

</div>

@mld1954 Welcome to the community 🥳

Please refer the similar post discussed [here](https://community.postman.com/t/verify-a-date-format-from-a-post-response/11046/4).

Something like below would work too:

```auto
var jsonData = pm.response.json();
console.log(jsonData.data)

let date = jsonData.data;

let moment = require ('moment');

pm.test("Checking data format", function () {
    pm.expect(date).to.include(moment(date).format('YYYY-MM-DD'));
});

```

---

_[View the full topic](https://community.postman.com/t/check-format-date-with-postman/28359)._
