i am developing an office addin using office.js, https://github.com/OfficeDev/office-js-docs/blob/master/reference/excel/range.md#property-access-examples i have to print the date to excel sheet. I am using Range.values to print the dates. Actually i get the date in iso format, after the using javascript function i convert that to only date string in local culture and then assign it to Range.Values property to write it in Excel. on Different culture the behavior is different, for example in Australian culture (Brisbane ) it shows as below
Before being assigned to range.values property my javascript does following
new Date("2016-08-09T14:00:00Z").toLocaleDateString();
new Date("2016-08-13T14:00:00Z").toLocaleDateString();
what is the best approach to fix this. i think if i set cells custom format to text it may work.
Windows-R►intl.cpl) will bring up theRegiondialog and display theShort Datesetting. - Ron Rosenfeld