Skip to content

Commit 6ff74d3

Browse files
committed
fix: update date extraction in SQL query to use DATE function for timestamp
1 parent e1ee4b6 commit 6ff74d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/takajopkg/web/controllers/summary.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ proc list*(ctx: Context) {.async.} =
118118
var dates_with_most_total_detections = db.getAllRows(sql query, params)
119119

120120
query = """SELECT level, level_order, rule_title, computer, COUNT(*) AS alert_count,
121-
MIN(date(dateime(timestamp))) AS first_seen, MAX(date(dateime(timestamp))) AS last_seen
121+
MIN(DATE(timestamp)) AS first_seen, MAX(DATE(timestamp)) AS last_seen
122122
FROM timelines
123123
GROUP BY level, rule_title, computer
124124
ORDER BY level_order DESC

0 commit comments

Comments
 (0)