how to convert date dd-mm-yyyy in sql query code example
Example 1: sql server cast date dd/mm/yyyy
--string to date
SELECT cast(convert(date, '23/07/2009', 103) AS DATE)
select convert(date, '23/07/2009', 103)
Example 2: SQL query to convert DD/MM/YYYY to YYYY-MM-DD
SELECT CONVERT(varchar(10), CONVERT(date, '13/12/2016', 103), 120)