Create Date and DateTime using values in SQL Server

Year, Month, Day are columns in MyTable table

Create Date from numbers

To create Date: DATEFROMPARTS ( year, month, day )

Select
datetimefromparts([Year], [Month], [Day]) as Submission_Date
From MyTable

Output: 2019-01-02

Create Date and Time from numbers

To create Date and Time: DATETIMEFROMPARTS ( year, month, day, hour, minute, seconds, milliseconds )

Select
datetimefromparts([Year], [Month], [Day], 00,00,00,0) as Submission_Date
From MyTable

Output: 2022-06-20 00:00:00.000