Convert date to ICS format for calendar invite | XM Community
Skip to main content

I am having trouble getting the date from my date picker into ICS format. I need to change the format then send it to embedded data. My date picker format is MM-dd-YYYY and I need it to be YYYY-MM-dd. For example, change 04-02-2020 to 2020-04-02. Then save that new ICS format date as an embedded field. Any help would be much appreciated!

you can use javascript native date function:
Date.prototype.getFullYear()Date.prototype.getDate()Date.prototype.getMonth()to recreate the ICS date and store that into embedded data


Leave a Reply