sql server select time format code example Example: sql convert date to string yyyy-mm-dd Click to copyselect CONVERT(char(10), GetDate(),126) /* 2020-12-23 */