Hi guys! Is there a way to convert the Field type of all items at once? I have to click convert for 366 rows each time I import from Excel. Excel’s ‘Date’ field type does not work with Wix. Wix has no separate field type for Date. It’s a mix of date and Time.
Is there a way to solve this issue?
Thanks.
You can try running this code:
import wixData from "wix-data";
wixData.query("MyCollectionName").limit(1000).find()
.then(r => {
let items = r.items.map(e => {
if(e.date){e.date = new Date(e.date);}
return e;
});
return wixData.bulkUpdate("MyCollectionName", items);
})