T
Tisha
Hello,
I'm trying to select a group of records with an effective date >= Jan 1 of
the prior year forward to date. So I created a compare date of date - 1
year. Next, I want to compare this date to the EFFCYMD so I created a ccyy
date field but the selection criteria fails. The date fields look
different. How do I compare these fields? Thanks!
SELECT tbl_ZCH.GRP, tbl_ZCH.IDNBR, tbl_ZCH.COMPCD, tbl_ZCH.EFFCYMD,
tbl_ZCH.CARCD, Year(Date())-1 AS Datecmp, (Mid([effcymd],1,4)) AS Effccyy,
Right([datecmp],4) AS [Year]
FROM tbl_ZCH;
I'm trying to select a group of records with an effective date >= Jan 1 of
the prior year forward to date. So I created a compare date of date - 1
year. Next, I want to compare this date to the EFFCYMD so I created a ccyy
date field but the selection criteria fails. The date fields look
different. How do I compare these fields? Thanks!
SELECT tbl_ZCH.GRP, tbl_ZCH.IDNBR, tbl_ZCH.COMPCD, tbl_ZCH.EFFCYMD,
tbl_ZCH.CARCD, Year(Date())-1 AS Datecmp, (Mid([effcymd],1,4)) AS Effccyy,
Right([datecmp],4) AS [Year]
FROM tbl_ZCH;