- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 06:41 AM
Hi there!
I'm trying to accomplish with a client requirement. They need to move the date of due date field in demands to the due date field in enhancement. Field specifications are as follows:
Due Date Demands:
- table: dmn_demand
- type: date
Due Date in enhancements:
- table: task
- type: date/time
In order to move this value from demand to enhancement I have modified the script that create enhancements from demands with this statement:
It seems to work correctly but there is a little problem that you can check below:
Demand:
Enhancements
You can see how enhancemetns takes the previous day at 17:00 to the one I put in demands
Is there anyway to adjust this in order to get the same dates in both fields?
thanks!!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 08:50 AM
I already informed in my 1st response it's because of the mismatch in field type
2 ways
1) create a new date field and set the value
OR
2) let the date value be populated in date/time with 00:00:00 in GMT and discuss with your customer
I won't recommend updating the OOB field on enhancement table.
Hiding of time in due date is not recommended and would be possible with client script.
Even if it's feasible it would require DOM manipulation which is not best practice.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 08:06 AM
Ok I get it...and what about show only the date? what should I do?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 08:12 AM
A date field only shows the date. The only way to make it show the date and time is to change the type, which I would advise against, since it's an OOTB field. Changing the type might break other things that run against it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 08:18 AM
Yes I know it, maybe I will create a new field to simplify the solution but...is there anyway to hide the "hours" in the enhancement due_date field? I only need to show the date, it's not necessary to show the time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 08:25 AM
Not that I'm aware of. Again, it's an OOTB field and it may have logic based on time being there. You could write a client script or business rule that always sets the time portion to 00:00:00, but I don't think you can completely remove it since the variable is a date/time variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 08:50 AM
I already informed in my 1st response it's because of the mismatch in field type
2 ways
1) create a new date field and set the value
OR
2) let the date value be populated in date/time with 00:00:00 in GMT and discuss with your customer
I won't recommend updating the OOB field on enhancement table.
Hiding of time in due date is not recommended and would be possible with client script.
Even if it's feasible it would require DOM manipulation which is not best practice.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader