Question: how to convert date to yyyy-mm-dd format in sql?
Answer: Use the date format option along with CONVERT function. To get YYYY-MM-DD use SELECT CONVERT(varchar, getdate(), 23) To get MM/DD/YYYY use SELECT CONVERT(varchar, getdate(), 1) Check out the chart to get a list of all format options.