Subtract days from date/time field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 11:19 AM
I have a custom date/time field on one of the ci tables in servicenow. From a high level what I wanted to do is look at that date/time field and if it is x days or more from now then set the ci status to some value. What I was thinking is do a split on the date/time and just extract the date, then from there can I just subtract the number of days from that date?
Currently that date field on the ci just holds a value like this - "07/30/2019 00:32:34". Then I will use that in my glidequery to only update those records that are x days and older.
I have taken a look at glidedate but not sure my date is in the correct format to use for that, so thats why I was wondering if I can just subtract the days from the date string.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2019 05:03 PM
Hi,
I just wanted to check and see how you're doing with this.
Let me know if you need further assistance.
If my reply above helped resolve your issue, please mark it as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!