Date difference in scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2017 10:49 PM
Hi All,
I want the difference of two date fields (to_date - from_date) in scoped application. I tried using dateDiff() method, but it was showing error that dateDiff is not allowed in scoped applications.
Could any one of you please help me in this regard.
Thanks in advance.
Thanks,
Aparna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2017 12:26 AM
Hello Aparna,
The function Subtract() expects two parameters of class "GlideDateTime", in your example you were parsing in "GlideElementGlideObject" (ie. current.to_date), hence why you are seeing the error.
You need to parse the glide value into and create a GlideDateTime object. Please note my line 1 and 2 is different to your code.
Kind regards,
Simon Liang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2017 01:22 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2017 05:00 AM
Use gs.addInfoMessage(dur.getDisplayValue()
);