Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2022 04:54 AM
It is highly recommended not to use display values, when doing scripting as this may give you unexpected results depending on display settings which may vary depending on customer regional settings etc. Instead use compareTo or numeric values when comparing dates. Here is an example:
javascript: var answer = ((new GlideDateTime(current.due_date)).getNumericValue() <= (new GlideDateTime().getNumericValue())); answer;
I hope this will help someone out there 🙂