I have set the date in the sitecore item for some datetime field as below.
And its getting saved as below format in the master/web database.
When I try to get that value using the below API.
webDB = Sitecore.Data.Database.GetDatabase("web"); var item = webDB.GetItem(itemId); var dateField = (DateField)item.Fields["fieldName"]; _xxx = Sitecore.DateUtil.IsoDateToDateTime(dateField.Value).ToString();
I am getting the below date and time 4/1/2017 7:30:00 AM
Here the difference is 5.30 hrs.
How do I get the exact time which is showing the CMS?