Transform map: How to change date/time to 24 hr format on stagging table record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 12:14 AM
Hi,
We are sending date from an excel file to a ServiceNow through Transform map.
The date format in excel file is 5/23/2024 03:55:50 PM but in ServiceNow staging table record the date field (string type) is showing 2024-05-23 03:55:50 however it should in 24 hr format i.e. 2024-05-23 15:55:50.
We have tried using field map date format as yyyy-MM-dd HH:mm:ss or yyyy-MM-dd HH:mm:ss a but they didn't work.
Please assist here how to change the format in staging table record to 24 hours format.
Thanks in advance!
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 12:38 AM
in source field it should be string and it should be stored as it is i.e. 5/23/2024 03:55:50 PM
Please check why in source field it's in wrong format.
once this is corrected you can use this in the date format on field map -> the a denotes AM or PM and will set target value accordingly
MM/dd/yyyy HH:mm:ss a
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
05-23-2024 02:07 AM
Hi,
I am using the below date format and script to convert the source field value to string and then converting it 24 hr format. Is this correct?
Regards