# Passing Today's Date In Gatling Body using session.set but no success

**URL:** <https://community.gatling.io/t/passing-todays-date-in-gatling-body-using-session-set-but-no-success/5495>\
**Category:** Gatling (Open-Source)\
**Created:** [February 14, 2020, 11:02pm UTC](https://community.gatling.io/t/passing-todays-date-in-gatling-body-using-session-set-but-no-success/5495 "2020-02-14T23:02:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarun\_Das](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tarun\_Das](https://community.gatling.io/u/Tarun_Das)\
**Post date:** [February 14, 2020, 11:02pm UTC](https://community.gatling.io/t/passing-todays-date-in-gatling-body-using-session-set-but-no-success/5495/1 "2020-02-14T23:02:58Z")

</div>

I am trying to pass today’s date in Gatling Body using session.set but no success

I have below code where using joda-time([https://www.joda.org/joda-time/](https://www.joda.org/joda-time/)) timestampfeeder variable is set

I have used below dependency in my pom.xml

```auto
<dependency>
  <groupId>joda-time</groupId>
  <artifactId>joda-time</artifactId>
  <version>2.9.9</version>
</dependency>

```

```auto
class gamekeeper extends BaseSimulation {

  val timestampFeeder: String = DateTimeFormat.forPattern("yyyy-MM-
 dd").print(DateTime.now())

exec { session => session.set( "TimestampFeeder", timestampFeeder )}

  val createPrivateEvent ={

    exec(http("Create Event As WER")

      .post("https://api.cloud/" + {Env} + "/silve-griffin-service/graphql")
      .headers(header)

   .body(ElFileBody("/Users/Downloads/createeventasWERwithcurrentdatetime.txt"))

      .check(status.in(200,201))
      .check(bodyString.saveAs("EventAsWER_Response"))

      .check(jsonPath(path="$.data.createEvent.id").saveAs(key="EventId")))

      .exec { session => session.set("NEW_ID", session("EventId").as[String]) }

      .exec{session=>println(session);session}
      //.pause(40,50)

  }

  val scenario4 = scenario("Full GameKeeper tests“exec(createPrivateEvent).

  setUp(

scenario4.inject(
  constantConcurrentUsers(userCount) during(testDuration))
  .protocols(httpProtocol))

.maxDuration(testDuration)

 }

```

```auto

```

```auto
Seems No success in value substitution ,why session.set is not able to replace the value of TimestampFeeder

```
