From d2e95c22463e1de9ee4cfa58b4f4cbd4c34baae2 Mon Sep 17 00:00:00 2001 From: Chukwuleta Tobechi <47084273+TChukwuleta@users.noreply.github.com> Date: Mon, 15 Apr 2024 04:21:56 +0100 Subject: [PATCH] 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 --- BTCPayServer/wwwroot/js/store-reports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/wwwroot/js/store-reports.js b/BTCPayServer/wwwroot/js/store-reports.js index 6ae364115..ef48d8c34 100644 --- a/BTCPayServer/wwwroot/js/store-reports.js +++ b/BTCPayServer/wwwroot/js/store-reports.js @@ -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");