SQL Server Date Formats
Hello to everyone,
In this article, I will talk about Date format change operations in SQL Server.
Date format change is often used in SQL Server.
You can use the codes below to change the date format.
1 |
|
mm/dd/yy | 12/30/06 |
2 |
|
yy.mm.dd | 06.12.30 |
3 |
|
dd/mm/yy | 30/12/06 |
4 |
|
dd.mm.yy | 30.12.06 |
5 |
|
dd-mm-yy | 30-12-06 |
6 |
|
dd-Mon-yy | 30 Dec 06 |
7 |
|
Mon dd, yy | Dec 30, 06 |
10 |
|
mm-dd-yy | 12-30-06 |
11 |
|
yy/mm/dd | 06/12/30 |
12 |
|
yymmdd | 061230 |
23 |
|
yyyy-mm-dd | 2006-12-30 |
101 |
|
mm/dd/yyyy | 12/30/2006 |
102 |
|
yyyy.mm.dd | 2006.12.30 |
103 |
|
dd/mm/yyyy | 30/12/2006 |
104 |
|
dd.mm.yyyy | 30.12.2006 |
105 |
|
dd-mm-yyyy | 30-12-2006 |
106 |
|
dd Mon yyyy | 30 Dec 2006 |
107 |
|
Mon dd, yyyy | Dec 30, 2006 |
110 |
|
mm-dd-yyyy | 12-30-2006 |
111 |
|
yyyy/mm/dd | 2006/12/30 |
112 |
|
yyyymmdd | 20061230 |
When you run the code, you will get a result like the one below.
As you can see, the date values have been changed in a formatted way.
Good luck to everyone in business and life