I am trying to get the time value from the a DateTime field in SharePoint 2013 online.
When I try to retrieve the value of the field, it is showing only my browser time value. I am using the following code,
var ListItem;
function GetValue(){
var SPContext = new SP.ClientContext(siteUrl);
var list= SPContext.get_web().get_lists().getByTitle(listName);
ListItem = list.getItemById(12345);
SPContext.load(ListItem);
SPContext.executeQueryAsync(GetListItemById_Success, GetListItemById_Fail);
}
function GetListItemById_Success()
{
var dateTimeValue = ListItem.get_item("DateTimeColumnName");
alert(dateTimeValue);
}
Let me know how to get the stored DateTime Value. I'm unable to set the property set_datesInUtc(false).