No, it just doesn't work that way. It doesn't matter what you do to the column in the select clause, the GROUP BY clause considers is TEXT, and you can't...
The code you gave uses several standard date functions that simply will not work with dates before 1753, which is the problem to begin with. The CHECK constraint you have...
An integer field wouldn't do much good because arithmatic on YYYYMMDD as an integer doesn't take into account overflows on days (31 or 30) or months (12). Day arithmatic is...