Easiest code to convert date format from Books to CRM
There's got to be a better way....?
Books - 06 Sep 2022
CRM - 2022-08-27
- day = estimated_ship_date.left(2);
- year = estimated_ship_date.right(4);
- month = estimated_ship_date.subText(3,6).lower();
- info month;
- // 06 Sep 2022
- // 2022-08-27
- if(month == "sep")
- {
- month = "07";
- }
- else if(month == "feb")
- {
- month = "02";
- }
-
- estimated_ship_date = year + "-" + month + "-" + day;