I'm having a hard time figuring out what date format I need to pass to this DATE() function on what I believe is an older T-SQL procedure.
As an example, It works in such a way that
This would appear to be the number of days since 0001-00-00.
That said, I am not sure which calendar is being used for this purpose. However, on Postgres, the following:
select date('4036-02-27') - 1473811 * interval '1 day'
returns Dec 31 of the year 1 BC.
Note: I realize the question is tagged "tsql" and not "Postgres", but the date format does not seem to be a tsql standard format.