- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2016 06:19 AM
I am pulling date from a change request table in notification script. the date time is converting into GMT which is throwing off my date/time for the change request.. how to convert the date time into local time zone to get the correct value .
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2016 06:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2016 06:25 AM
Use getDisplayValue();
current.<date field_name>.getDisplayValue();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2016 06:25 AM
Hi Malaya,
IF you are getting the date and time form a script, use the getDisplayValue() method on the variable.
e.g. current.start_time.getDisplayValue()
If you can, include some details (code, script, notification message content) of what you are doing. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2016 06:37 AM
Thanks @chuck and @Abhinay... i was pulling system value rather than display value... got it working now...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2019 03:49 AM
Hello CHuck,
I hope you can help me, please:
I have this topic:
In the record:
There is a field that store date time
and I need to bring that value in a serivice and I am using the Ajax function
Here the code
***********************************************************************************************
var ga = new GlideAjax("AutoFrameAjax");
ga.addParam("sysparm_name", "records_get_list");
ga.addParam("sysparm_table", "sc_req_item");
ga.addParam("sysparm_query","number="+newValue);
ga.addParam("sysparm_fields", "cat_item,short_description,opened_at");
ga.getXML(function(response) {
var result = JSON.parse(response.responseXML.documentElement.getAttribute("answer"));
var item = result[0]['cat_item'].toString();
console.log("item 2" + item);
var shortdes = result[0]['short_description'].toString();
console.log("short 2" + shortdes);
// var installDate = new GlideDateTime();
//installDate.setDisplayValue(result[0]['opened_at'].getDisplayValue());
var opened = result[0]['opened_at'];
// alert (opened);
console.log("opened 2" + opened);
g_form.setValue('u_request_name', item);
g_form.setValue('u_request_short_description', shortdes);
g_form.setValue('u_request_start_date', opened);
opened is the value that I require...
***********************************************************************************
the stystem brings this:
The value has 6 hours more.....
How can I obtain Local Zone time in the field...
Note: I can't create new catalog client script include
Please HELP!