Question: how to set date format mm-dd-yyyy in sql?
Answer: Use the FORMAT function to format the date and time.
To get DD/MM/YYYY use SELECT FORMAT (getdate(), 'dd/MM/yyyy ') as date.
To get MM-DD-YY use SELECT FORMAT (getdate(), 'MM-dd-yy') as date.
Check out more examples below.