Hi Team, I have a table that contains data that I need to segregate into 4 different FY's (FY25Q1 to FY25Q4). The date format used in my column is Confluence's standard '//'. The code I have below gives me results where all the results in the new column (END AS..) is text 'BEYOND FY25'. I am not sure if the code is incorrect or if Confluence is unable to recognise the date format used in my code vs the format in my table.
SELECT *,
CASE
WHEN T1.'Date Contract will Expire' >= '01 Oct 2024' AND T1.'Date Contract will Expire' <= '31 Dec 2024' THEN "FY25Q1"
WHEN T1.'Date Contract will Expire' >= '01 Jan 2025' AND T1.'Date Contract will Expire' <= '30 Mar 2025' THEN "FY25Q2"
WHEN T1.'Date Contract will Expire' >= '01 Apr 2025' AND T1.'Date Contract will Expire' <= '30 Jun 2025' THEN "FY25Q3"
WHEN T1.'Date Contract will Expire' >= '01 Jul 2025' AND T1.'Date Contract will Expire' <= '30 Sep 2025' THEN "FY25Q4"
ELSE "BEYOND FY25"
END AS 'FY25 & BEYOND Contracts'
FROM T1