- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 08:24 PM
Hi Team,
We have a requirement to load data from a third-party source in to ServiceNow (custom table).
One challenge is the date/time format provided by the third-party application is in "2024-05-22T16:00:40Z" format. We need to convert this and update to the date/time field in ServiceNow (Created).
Please let me know any pointers that would be helpful.
Thanks,
Gopi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 08:18 PM
Hi Sandeep,
Thank you for responding 🙂 Appreciate your effort.
I have not looked in to the approach you suggested though, because I was able to move ahead with another approach which is to use the below script in my transform map field map script. This worked as required. Hope this be helpful to anyone having same or similar requirement.
Thank you again 🙂
Regards,
Gopi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 08:33 PM
Hi @Gopi22 ,
This is kind of a complex one !!
so this is what i could find from stack overflow :
You need to set both .SSS
and Z
with your dateFormat
, so your dateFormat
should be yyyy-MM-dd'T'HH:mm:ss.SSSZ
.
let dateFormatter = DateFormatter()
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
let date = dateFormatter.date(from: "2017-01-09T11:00:00.000Z")
print("date: \(date)")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 08:18 PM
Hi Sandeep,
Thank you for responding 🙂 Appreciate your effort.
I have not looked in to the approach you suggested though, because I was able to move ahead with another approach which is to use the below script in my transform map field map script. This worked as required. Hope this be helpful to anyone having same or similar requirement.
Thank you again 🙂
Regards,
Gopi