- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 12:50 AM
We have two date/time type fields and the requirement is to capture the difference of these date/time fields into a duration type field . I have written business rule and i am getting subtraction value in seconds or days 00:00:00 format using script but if i set that value to duration type field then it is not working . Sometimes i am getting some 1970-01-01 date with the difference value added to that date. Please advise.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 01:49 AM
instead of return dur ; use below line
current.<duration_field_name> = dur;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 01:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 01:10 AM
Hi Suvro,
Thanks for the reply. The requirement can be fulfilled using string type field but the requirement here is use duration type field only so I wanted to know if the difference of two date/time fileds can be calculated in a duration type field or not. If yes, how ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 01:45 AM
I have used duration type field only ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 01:49 AM
instead of return dur ; use below line
current.<duration_field_name> = dur;