- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2019 07:12 AM
Hello,
I am getting value of date/time field in GMT format from one API and inserting that value to my table. I need to convert that GMT format into IST then I want to insert that value in my table.
Can anyone please help me with this.
Regards,
Nivedita
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2019 04:06 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2019 11:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2019 12:30 PM
I have done in same way but date/time is not same. I am getting time as 12:00 AM only.
Below is my screenshot :
Below is my code :
// update the record
gs.log("update records");
//var gdt = new GlideDateTime();
//var tz = Packages.java.util.TimeZone.getTimeZone("IST"); //sets to IST
//gdt.setTZ(tz);
var Event_start_date_1 = obj.plannedEvents[i].plannedEventStartDate;
var Event_end_date_1 = obj.plannedEvents[i].plannedEventEndDate;
gs.log("Start and end dates are "+Event_start_date_1+"---"+Event_end_date_1);
gr.u_plannedevent_start_date = Event_start_date_1;
gr.u_plannedevent_end_date = Event_end_date_1;
gr.u_rollback_plan = obj.plannedEvents[i].rollbackPlan;
//gr.u_plannedevent_start_date = obj.plannedEvents[i].plannedEventStartDate;
gr.u_closure_code = obj.plannedEvents[i].closureCode;
gr.u_description = obj.plannedEvents[i].description;
//gr.u_plannedevent_end_date = obj.plannedEvents[i].plannedEventEndDate;
gr.u_ticket_id = obj.plannedEvents[i].ticketId;
gr.u_correlation_id = obj.plannedEvents[i].correlationId;
gr.u_impact = obj.plannedEvents[i].impact;
gr.u_execution_owner = obj.plannedEvents[i].executionOwner;
gr.u_maintenance_type = obj.plannedEvents[i].maintenanceType;
gr.u_site_location= obj.plannedEvents[i].siteLocation;
gr.u_expected_downtime= obj.plannedEvents[i].expectedDowntime;
gr.u_activity_status= obj.plannedEvents[i].activityStatus;
Please correct me if i am wrong.
Regards,
Nivedita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2019 07:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2019 01:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2019 02:28 AM
Hello,
Can you please help me why i am not getting the correct date/time similar to date/time which i am getting from API.
Regards,
Nivedita