Converts the date format of a database. It is enough to specify the date format in convert, such as: selectconvert (char (20), getdate (), 101) selectemp_id, convert (char (20), hire_dt, 101) fromemployee ----------------------- you only need to specify the date format code in convert, such:
Select convert (char (20), getdate (), 101)
Select emp_id, convert (char (20), hire_dt, 101) from employee
-----------------------------------------------------
Date format code
-------------------------------
04/05/2000 101
-------------------------------
2000100004.05 102
-------------------------------
05/04/2000 103
-------------------------------
05.04.2000 104
-------------------------------
105
-------------------------------
05 Apr 2000 106
-------------------------------
Apr 05,200 0 107
-------------------------------
11:33:24 108
-------------------------------
Apr 5 2000 11:33:24 109
-------------------------------
04-05-2000 110
-------------------------------
2000/04/05 111
-------------------------------
20000405 112
Explain select convert (char (20), getdate (), 101) select emp_id, convert (char (20), hire_dt, 101) from employee -----------------------...