DB - (MSSQL) 날짜 변환처리 방법
Datetime을 상황에 따라 날짜형식을 변환시키는 방법은 여러가지가 있으며 다음 표에 따라 적절히 사용할 수 있습니다 주로 사용하는 형식은 21, 23, 112, 121이며 사용법은 다음과 같습니다. select getdate() -- 2021-07-14 15:54:13.967 select convert(char(23), getdate(), 21) -- 2021-07-14 15:52:17.763 select convert(char(10), getdate(), 23) -- 2021-07-14 select convert(char(8), getdate(), 112) -- 20210714 select convert(char(23), getdate(), 121) -- 2021-07-14 15:52:17.763 ..
2021. 7. 14.