diff --git a/src/import-export/csv-exp/assistant-csv-export.c b/src/import-export/csv-exp/assistant-csv-export.c
index db9aba23e3..25e74f23ab 100644
--- a/src/import-export/csv-exp/assistant-csv-export.c
+++ b/src/import-export/csv-exp/assistant-csv-export.c
@@ -504,7 +504,7 @@ get_filter_times (CsvExportInfo *info)
}
else
{
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(info->csvd.start_date_today)))
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(info->csvd.end_date_today)))
info->csvd.end_time = gnc_time64_get_today_end();
else
info->csvd.end_time = gnc_time (NULL);
diff --git a/src/import-export/csv-exp/assistant-csv-export.glade b/src/import-export/csv-exp/assistant-csv-export.glade
index 6b0433017e..ab7c8725b3 100644
--- a/src/import-export/csv-exp/assistant-csv-export.glade
+++ b/src/import-export/csv-exp/assistant-csv-export.glade
@@ -639,6 +639,7 @@ Select the type of Export required and the separator that will be used.
False
True
True
+ end_date_latest
@@ -659,7 +660,7 @@ Select the type of Export required and the separator that will be used.
False
True
True
- end_date_choose
+ end_date_latest
@@ -681,7 +682,6 @@ Select the type of Export required and the separator that will be used.
True
True
True
- end_date_choose