Skip to Content

Adding mins to date&time field

Apr 04, 2017 at 10:42 AM


avatar image
Former Member

Hi All,

Iam working on Agentry, WM6.3 and i need to have a solution where certain minutes(a constant) need to be added to the current timestamp (date and time together).

I have added a Date & Time property in the transaction and added a rule which calls a JavaScript to add the mins to current timestamp, but the javascript always returns 0.

function convert(str) {

var currentDate = new Date();

return currentDate.setTime(currentDate.getTime() + str*60*1000); }

Can anyone suggest any other ways to achieve this.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mark Pe
Apr 07, 2017 at 02:38 PM


You may check this Wiki but this example is subtracting versus adding so you may just change it accordingly. It's all tied to epoch date.

Best Regards,

Mark Pe
SAP Product Support

10 |10000 characters needed characters left characters exceeded