From 093207b11cadffe5b294c784a97b09caf00b3a78 Mon Sep 17 00:00:00 2001 From: yamelsenih Date: Thu, 5 Dec 2024 20:03:07 -0400 Subject: [PATCH] Fixed error with date sorting --- src/main/java/org/spin/report_engine/data/Cell.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/spin/report_engine/data/Cell.java b/src/main/java/org/spin/report_engine/data/Cell.java index e275275..3fe3c9e 100644 --- a/src/main/java/org/spin/report_engine/data/Cell.java +++ b/src/main/java/org/spin/report_engine/data/Cell.java @@ -15,6 +15,8 @@ package org.spin.report_engine.data; import java.math.BigDecimal; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; import org.compiere.util.Env; import org.compiere.util.Util; @@ -108,6 +110,9 @@ public Cell withValue(Object value) { } public String getCompareValue() { + if(value instanceof Timestamp && value != null) { + return new SimpleDateFormat("yyyy-MM-dd").format((Timestamp) value); + } if(Util.isEmpty(displayValue)) { if(value != null) { return String.valueOf(value);