I am posting data points in pre-execution script and dont know how to create timestamp, trying Date.parse(api.date()) below, What's the correct way to do this ?
"CUSTOM_DEVICE": "Load Balancers"
Solved! Go to Solution.
I would use a variable and get the value before you start to create the requestBody. Something like this:
var timestampNow = api.date();
and then use the variable later. Or if you need it to be in a specific format you can use api.dateToFormat. You can find a couple of examples here