mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-01 13:14:30 +01:00
update csv export to include full date and time in 12 hour format (#5922)
* update csv export to include full date and time in 12 hour format * formatting the export datetime to 24 hours
This commit is contained in:
committed by
GitHub
parent
893b92439c
commit
d2e95c2246
@@ -185,7 +185,7 @@ function downloadCSV() {
|
||||
|
||||
// Convert ISO8601 dates to YYYY-MM-DD HH:mm:ss so the CSV easily integrate with Excel
|
||||
modifyFields(srv.result.fields, data, 'amount', displayValue)
|
||||
modifyFields(srv.result.fields, data, 'datetime', v => v? moment(v).format('YYYY-MM-DD hh:mm:ss'): v);
|
||||
modifyFields(srv.result.fields, data, 'datetime', v => v ? moment(v).format('YYYY-MM-DD HH:mm:ss') : v);
|
||||
const csv = Papa.unparse({ fields: srv.result.fields.map(f => f.name), data });
|
||||
const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });
|
||||
saveAs(blob, "export.csv");
|
||||
|
||||
Reference in New Issue
Block a user