converting string to GlideDateTime
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2015 04:35 PM
Hi - hopefully someone has encountered this before and can get me over the last hurdle. I am importing records from excel into SN using a transform map. A few fields are date fields or which i have made strings - then during the transform i convert to glidedateTime. The transform reports ignored errors and the dates populate in the target but the HHMMSS do not convert but default to midnight. I need to keep as date time and in dd-mmm-yyyy hh:mm:ss format. My transform script is onBefore:
var gdt = new GlideDateTime();
gdt = source.uclosed;
target.u_closed = get + get.addDays(+1);
I have to add one day to match the source date.
Any help is appreciated.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 08:53 AM
in the end it in fact came down to formatting not scripting. the date format that worked was MM/dd/yyyy H:mm
Thanks both of you for your suggestions!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 05:40 PM
No worries
Please mark anything that was useful as 'helpful'
Feedback is important
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2016 11:39 PM
@Paul can you please have a look at this question Parse Apr-01-2016 11:11:58 PM to yyyy-MM-dd hh:mm:ss format.