Dates displaying differently in form and database field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2023 06:28 PM
I am using a transform map to map the values from a CSV file to asset table in service now.
In CSV field created date field has got the value of "14-07-2017 09:29:16". When it is being imported in to the table the date in the form displays the value correctly as above. But when I verify the date using the show xml it is showing as "2017-07-13 23:29:16".
Any idea why this difference in the date value is coming up?
Thank you,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2023 08:48 PM
Hi @Community Alums
The difference in formats is due to date format that is selected by the user and instance/system date format.
The date format you see on forms is the date format selected by user and is applicable to only that user while date format you see on xml is the system/instance date format and applicable to all users.
You can find user selected format in user's profile form
And find instance date format by clicking on user Profile >Preferences > Display option available to admins
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2023 09:02 PM
Hello @Community Alums
What I think is its because of Time zone and this is perfectly fine.
If you want to test it then change your (current) user's time zone to system default and check it.
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates