I have list of items, each item has start/stop date which is saved on Firestone as unix timestamp.
But displaying it as date on retool. So on update transformer can not convert changed date to unix timestamp. Can retool team help me with that?
var updatedData = {{ adsList.recordUpdates }};
updatedData.map(item => {
// if date is string
if (typeof item.start_ts === 'string') {
item.start_ts = new Date(item.start_ts).getTime() / 1000;
}
if (typeof item.stop_ts === 'string') {
item.stop_ts = new Date(item.stop_ts).getTime() / 1000;
}
});
// has updated data
// but returning it not saving it to Firestone as unix timestamp
// still saving as date
return updatedData;
p.s.
Somewhere I saw, that I had to use data variable, but in transformer has data with diff values in it.