Hi there,
I want to add days to a date value. Something like below.
form1.controller.newRecord();
form1.due_date = application.getServerTimeStamp + 14;
But it gives a strange number instead of the correct date value.
Can any one please explain what I am doing wrong?
Thanks
Hameed
Create a date object first…
var serverDate = application.getServerTimeStamp() // serverDate is a Date Object.
// you can now use the methods in the JSLib>Date node to manipulate the date object
// ".setDate(integer)" where integer is nr of days to add/subscract
// ".setMonth(integer)" where integer is nr of months to add/subscract
// etc....
serverDate.setDate( serverDate.getDate()+14) // add 14 days
form1.due_date = serverDate;
Thanks!! Works like charm.