14,494 questions
One method to convert the decimal YYYYMM value to a datetime2 is to append '01' to form an ISO 8601 date format string (YYYYMMDD). The example below also includes TRY_CAST to will set invalid dates to NULL.
SET MNDT = TRY_CAST(CAST(MGDT AS char(6)) + '01' AS datetime2)