Exclude time while running background script in Servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 08:00 AM
Hi
I have a requirement to run background script on demand form. if demand is having contract then contract created date should populate on Actual won date on demand form, I have written background script but here the issue is Contract creted field is Date/Time type and Actaula won date is only Date field so it is updating one day before the contract created date, so I need to exclude the time from contract created date.
any idea how can we achiev this - below is my code it is working for updating the records but need to exclude the time from contract created date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 03:35 AM
Hello @rashmin3
Please try the below code if any thing else please ping me and i hope this will work
}
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You