# Date time format

**URL:** <https://community.gatling.io/t/date-time-format/5589>\
**Category:** Gatling (Open-Source)\
**Created:** [April 24, 2020, 6:03am UTC](https://community.gatling.io/t/date-time-format/5589 "2020-04-24T06:03:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naveen\_Agarwal](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@Naveen\_Agarwal](https://community.gatling.io/u/Naveen_Agarwal)\
**Post date:** [April 24, 2020, 6:03am UTC](https://community.gatling.io/t/date-time-format/5589/1 "2020-04-24T06:03:41Z")

</div>

Hi,

I am new to gatling and I want to pass time parameter in json post Body in gatling .  
In Jmeter I am good by using below parameter:  
${\_\_time(yyyy-MM-dd’T’hh:mm:ss}

Please suggest me , how can we pass custom time format for below post pody in gatling.

post Body :  
{  
“updateTimeStamp”: “2020-04-21T09:22:20”

}

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [April 24, 2020, 6:58am UTC](https://community.gatling.io/t/date-time-format/5589/2 "2020-04-24T06:58:42Z")

</div>

You can generate such date Sting with a [SimpleDateFormat](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html), store it in the Session in an [exec(function) block](https://gatling.io/docs/current/general/scenario/#exec) and inject it in your request body with [Gatling EL](https://gatling.io/docs/current/session/expression_el/).
