T-SQL 101: 62 Calculating date values from day month and year in SQL Server T-SQL using DATEFROMPARTS
I mentioned in earlier posts that there’s no standard way to write dates, so we end up having to write them as strings. Now that was a real problem in earlier versions where people would get that wrong.
SQL Server 2012 added an option to make that easier. DATEFROMPARTS allows you to specify a year, month, and a day to create a date, and always in that order.
Look at the following query:
2020-03-23