I am trying to convert a date stored as an integer in SQL but the format of it is YYYYMMDD so when I try to convert it or cast it as datetime it gives an overflow arithmetic