Skip to content
Snippets Groups Projects
Commit 37c76ad9 authored by Timur Oberhuber's avatar Timur Oberhuber :speech_balloon:
Browse files

:bug: Fix Excel Time Import Bug

parent ea370ca7
No related branches found
No related tags found
1 merge request!358WAITING FOR OTTO - Add Time Filter and Multiple Program Selection for Application Exports + Add Excel Import/Export Support
Pipeline #1009708 failed
...@@ -106,9 +106,9 @@ public class ExcelService implements ImportExportService { ...@@ -106,9 +106,9 @@ public class ExcelService implements ImportExportService {
rowArray[col] = cell.getValue().toString(); rowArray[col] = cell.getValue().toString();
if (Double.parseDouble(rowArray[col]) >= 43830) { // 43830 = 01/01/2020 if (Double.parseDouble(rowArray[col]) >= 43830) { // 43830 = 01/01/2020
LocalDateTime parsedDate = row.getCellAsDate(col).get(); LocalDateTime parsedDate = row.getCellAsDate(col).get();
if (rowArray[col].contains(".")) { if (rowArray[col].contains(".")) { // Note - doesn't work with time = 00:00
rowArray[col] = parsedDate rowArray[col] = parsedDate
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); .format(DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm"));
} else { } else {
rowArray[col] = parsedDate.format(DateTimeFormatter.ofPattern("dd-MM-yyyy")); rowArray[col] = parsedDate.format(DateTimeFormatter.ofPattern("dd-MM-yyyy"));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment