Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
How to set sysdate variable in the .json object?

I have a post .json method where I send an object:

{
"targetSigningDate": "2021-09-22T21:00:00.000Z"
}

The "targetSigningDate" must always be 'sysdate'. Instead of manualy chaning the date, how to set sysdate into the object using pre-req. script ?

Thank you in advance

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

JSON format does not expect a sysdate type value, so it won't be parsed as sysdate by parsers. You should do it programmatically yourself instead.

about 4 years ago · Juan Pablo Isaza Report

0

I've figured it out by creating a pre-request script where I set a variable 'moment' and then set it to the environment

looks like this:

{
    var moment = require('moment')
    pm.environment.set("sysdate", moment())
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!