Need to Change my Date to UTC Format

Aswartha
Mega Contributor

Hi Everyone,

I am integrating Servicenow to IGC(Which is 3rd party Application) through Servicenow Workflow.

i am able to pass all the field values into IGC,but due_date value is not passing to IGC(showing error:Unable to parse the Date Format)

Date format in IGC is UTC, so in Run script how can i changes my Date format to UTC.

If anyone knows, please let me know, i need to submit this task ASAP

Thank you,

Aswartha

 

12 REPLIES 12

Nitesh Alashe1
Giga Expert

Hello,

I guess UST time is same as GMT time.
then its to easy you can use GlideDateTime() this will always return you GMT and then pass it to your API.

BR
Nitesh

Hi Nitesh,

I need to convert to UTC through SNow Workflow Activity

 

1)On Catalog page, Variable name is due_date

2)Run script: var date1 = current.variables.due_date(in Servicenow it comes with IST Format)

3)try {
var r = new sn_ws.RESTMessageV2('Creating Terms in IGC with Snow workflo', 'Post Terms');
r.setStringParameterNoEscape('custom_Due date',date1 ); (in IGC date in UTC Format)

but i am getting Error this way,if you have any idea please help me,

Thank you

find_real_file.png

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Which timezone is this? If it is same as GMT/UTC then no need to convert; directly pick value and send it across

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sorry Ankur,

i need to convert into UTC through workflow Runscript Activity