Hi,
I have two date fields and I want to get the difference of these dates as an integer and have it in another field.
I am using FlexiLayout studio for the document definition.
Please let me know how to achieve this?
Thanks!
I have two date fields and I want to get the difference of these dates as an integer and have it in another field.
I am using FlexiLayout studio for the document definition.
Please let me know how to achieve this?
Thanks!
コメント
2件のコメント
The following code snippet (JScript) allows to calculate date difference and write it to the Interval field. Please note the date format is mm/dd/yyyy.
today = new Date("10/15/2015");
olddate = new Date("10/10/2015");
diff = today.getTime() - olddate.getTime();
diffs = Math.floor(diff / 1000 / 60 / 60 / 24); // get days
this.Field("Interval").Text = diffs;
Here you can find more examples with date processing.
サインインしてコメントを残してください。