Date Formatting in Kendo Grid and Handling Timezone
In Kendo Grid, the dates are formatted to ' Mon Feb 01 2021 02:03:04 GMT+0530 (India Standard Time) '. To convert to a specific format or specific time zone we can try below options. "kendo.parseDate(data.CreatedDate)" -- to keep the date data type same and convert to the local browser's timezone "kendo.parseDate(data.CreatedDate, 'MM-dd-yyyy')" -- to keep the data data type and format the data type to the local browser's timezone "kendo.toString(kendo.parseDate(data.CreatedDate), 'MM/dd/yyyy hh:mm:ss tt" -- to format the date to string format with whatever timezone it has received from the server. This converts hours into 12 hour format. when you replace hh with HH it will give 24 hour format. For converting to specific timezone, we can try the below.. "CreatedDate.toLocaleString("en-US", {timeZone: "America/New_York"})" -- Works only in Chrome and Forefox. For IE, it throws an error. "Cre