Forum Discussion

sameer004's avatar
sameer004
New Contributor
7 years ago

How to send todays date in JSON reqest while doing a HTTP Post.

Hi All

 

I wanted to know if its possible to sent current day in JSON post request without me having to manually modify request each time. so I am looking for dynamic date

 

My POST request looks like this:

Message Body

 

{
"empNumber": 100000,
"dept": "IT",
"empName": "Testing Champ",
"joiningDate": "2017-08-24",
}

 

Response:

[{confirmationNum("123132")}]

 

'So joining date need to be dynamic so I dont have to update case everyday.

 

Thanks 

1 Reply

  • PaulMS's avatar
    PaulMS
    Super Contributor

    "joiningDate": "${= StatementDate = Calendar.instance; StatementDate.format('yyyy-MM-dd')}",