# How to pass current date as a value in GET request

**URL:** <https://community.postman.com/t/how-to-pass-current-date-as-a-value-in-get-request/17303>\
**Category:** Help Hub\
**Tags:** scripts, time, moment\
**Created:** [November 2, 2020, 9:43am UTC](https://community.postman.com/t/how-to-pass-current-date-as-a-value-in-get-request/17303 "2020-11-02T09:43:13Z")\
**Posts on this page:** 1\
**Showing post:** 13

<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:** [September 8, 2021, 2:42pm UTC](https://community.postman.com/t/how-to-pass-current-date-as-a-value-in-get-request/17303/13 "2021-09-08T14:42:16Z")

</div>

@chinajohi Welcome to the community 🥳 Similar query is answered here, can you please check this:

> [@Postman TodayDate variable to get past dates](https://community.postman.com/t/postman-todaydate-variable-to-get-past-dates/22290/4):
>
> @mattschmitt No problem blush I thought any past date would work for you. So please try the below snippet then: const moment = require('moment'); const today = moment(); var todayDate = today.format('YYYYMMDD'); pm.globals.set("todayDate", todayDate); var tenDaysBack = moment().subtract(10, 'days'); //console.log(tenDaysBack); pm.globals.set("tenDaysBack", tenDaysBack.format('YYYYMMDD')); Please let me know if you still face any issues here slightly_smiling_face

---

_[View the full topic](https://community.postman.com/t/how-to-pass-current-date-as-a-value-in-get-request/17303)._
