adjusted date param

This commit is contained in:
Dona Maria Absi
2025-05-01 14:25:09 +03:00
parent ccba81ef1f
commit cc755e5640

View File

@ -1,8 +1,8 @@
WITH params AS (
SELECT
NULLIF($1, '')::uuid AS space_id,
NULLIF($2, '')::text AS start_month, -- Format: 'MM-YYYY'
NULLIF($3, '')::text AS end_month
TO_CHAR(TO_DATE(NULLIF($2, ''), 'DD-MM-YYYY'), 'MM-YYYY') AS start_month,
TO_CHAR(TO_DATE(NULLIF($3, ''), 'DD-MM-YYYY'), 'MM-YYYY') AS end_month
)
SELECT