Skip to main content
Solved

Passing a timestamp value into the payload of an IFS API call in a workflow

  • February 18, 2026
  • 2 replies
  • 16 views

Forum|alt.badge.img+3

Hi,

 

Im trying to pass a timestamp parameter into an IFS API call in a workflow. But keep getting the data type conversion error as below. I create the timestamp of sysdate in a javascript task(“Set Sysdate”) and then trying to set it into a variable which is then set into API payload. Could there be any other way to set the parameter other than like ${CurrDate} in this scenario?

 

 

 

 

Thanks,

Regards,

Methshika

Best answer by kamnlk

hi ​@SYBMETHSHIKA ,

In here the problem is the format returned from the script is not a supported date time format in workflow

you can try something like below 

var d = new Date(); 

// toISOString comes in format yyyy-MM-ddTHH:mm:ss.sssZ
// Reformat the timestamp without the "T", as yyyy-MM-dd-HH.mm.ss

var currDate= d.toISOString().replace("T", "-").split(".")[0].replaceAll(":", ".");

execution.setVariable('currDate', currDate);

ref: Frequently Asked Questions - Technical Documentation For IFS Cloud

2 replies

Forum|alt.badge.img+9
  • Hero (Employee)
  • Answer
  • February 18, 2026

hi ​@SYBMETHSHIKA ,

In here the problem is the format returned from the script is not a supported date time format in workflow

you can try something like below 

var d = new Date(); 

// toISOString comes in format yyyy-MM-ddTHH:mm:ss.sssZ
// Reformat the timestamp without the "T", as yyyy-MM-dd-HH.mm.ss

var currDate= d.toISOString().replace("T", "-").split(".")[0].replaceAll(":", ".");

execution.setVariable('currDate', currDate);

ref: Frequently Asked Questions - Technical Documentation For IFS Cloud


Forum|alt.badge.img+3
  • Author
  • Do Gooder (Customer)
  • February 18, 2026

Thanks ​@kamnlk !..it works!

/Methshika