Help Needed: Date and Date/Time Field Value Discrepancy in ServiceNow

faisalkhan2
Kilo Contributor

Hello Community,

I'm working on a task where two custom fields — one a Date field and the other a Date and Time field — are expected to hold the same value. However, there’s a discrepancy in the values even though the same value is being set for both fields in the script. 

Suspected Cause: One potential cause I’m considering is timezone differences, which could explain why the Date field and Date/Time field display different values, even though they’re set to the same value in the script.

Has anyone encountered similar issues with Date and Date/Time fields, or could provide insights into additional areas to check? Any suggestions would be greatly appreciated!

Thanks in advance!

1 REPLY 1

Kieran Anson
Kilo Patron

I'd suggest sharing your script which is setting these values - Dates are hard to work with in javascript, and if you add in ServiceNow it takes some getting use to. I imagine you're correct and that timezones aren't being accommodated in the existing logic