My table has a DATE field, which is showing the DATE AND TIME. I want to remove the time. I have found this but don’t know how to finish the statement (found at the bottom of the code snippet):
row.dateField1 = ???
I have changed it to match my field title so it reads:
row.startingWeek = ???
But am unsure how to complete this statement.
Any help would be much apprieciated!
export function myDataset_ready() {
// get the table's columns
let columns = $w('#table1').columns;
// change all date columns to type string
columns = columns.map( (column) => {
if(column.type === 'date'){
column.type = 'string';
}
return column;
} );
// reset the table's columns
$w('#table1').columns = columns;
// get the table's rows
let rows = $w('#table1').rows;
//
rows = rows.map( (row) => {
row.dateField1 = // changed value
row.dateField2 = // changed value
return row;
} );
$w('#table1').rows = rows;
}