SPATIUM Mobile
주소복사
About Operating System Languages Tools Favorites Notice Visit TEST  
     ADK (3)
     android (3)
     ASP (5)
     ASP.Net (1)
     C# (5)
     HTML (9)
     JAVA (7)
     JavaScript (9)
     jQuery (5)
     Mobile Web (2)
     node.js (1)
     Oracle (8)
     PHP (7)
     Spring Framework (4)
     SQL (17)
     WPF (5)
   ID  
   Password  
  |  
  Location United States
  IP Address 18.117.70.64
2024. 11
12
3456789
10111213141516
1718192021
22
23
24252627282930
Category  Languages, SQL
Writer 김태우 Date 2011-12-27 20:15:55 Visit 5083
MSSQL 날짜 표현 방법

 

MSSQL 날짜 표현 방법

select
CONVERT(NVARCHAR(20), GETDATE(), 100) ,
CONVERT(NVARCHAR(20), GETDATE(), 101),
CONVERT(NVARCHAR(20), GETDATE(), 102),
CONVERT(NVARCHAR(20), GETDATE(), 103),
CONVERT(NVARCHAR(20), GETDATE(), 104) ,
CONVERT(NVARCHAR(20), GETDATE(), 105) ,
CONVERT(NVARCHAR(20), GETDATE(), 106) ,
CONVERT(NVARCHAR(20), GETDATE(), 107) ,
CONVERT(NVARCHAR(20), GETDATE(), 108) ,
CONVERT(NVARCHAR(20), GETDATE(), 109) ,
CONVERT(NVARCHAR(20), GETDATE(), 110) ,
CONVERT(NVARCHAR(20), GETDATE(), 111) ,
CONVERT(NVARCHAR(20), GETDATE(), 112) ,
CONVERT(NVARCHAR(20), GETDATE(), 113) ,
CONVERT(NVARCHAR(20), GETDATE(), 114) ,
CONVERT(NVARCHAR(20), GETDATE(), 120) ,
CONVERT(NVARCHAR(20), GETDATE(), 121) ,
CONVERT(NVARCHAR(20), GETDATE(), 126)

출력을 하면 아래와 같이 출력됨, 순서는 위 selsect 문의 순서임

12 27 2011  7:56PM
12/27/2011
2011.12.27
27/12/2011
27.12.2011
27-12-2011
27 12 2011
12 27, 2011
19:56:50
12 27 2011  7:56:50:
12-27-2011
2011/12/27
20111227
27 12 2011 19:56:50:
19:56:50:410
2011-12-27 19:56:50
2011-12-27 19:56:50.
2011-12-27T19:56:50.

 

Tags  MSSQL, 날짜함수, CONVERT
  Relation Articles
[Languages-SQL] MSSQL, DDL 트리거 이용, 변경 이력 저장(형상관리처럼..) (2014-10-29 10:36:55)
[Languages-WPF] Binding Converter : IValueConverter (2013-08-06 12:16:38)
[Languages-ASP] ASP 날짜함수 (2012-05-31 11:34:19)
[Languages-SQL] MSSQL 날짜 표현 방법 (2011-12-27 20:15:55)
[Languages-PHP] PHP 날짜 함수 (2011-09-07 15:18:20)
[Languages-SQL] [ MSSQL ] replace 함수 (2011-08-24 16:01:16)
  Your Opinion
Member ID
150 letters
Copyright (C) SPATIUM. All rights reserved.
[SPATIUM]WebMaster Mail