Notice
Recent Posts
Recent Comments
Link
투케이2K
77. (MSSQL/SQL) EOMONTH 사용해 지정한 특정 월 (MONTH) 의 마지막 날짜 출력 실시 본문
[개발 환경 설정]
개발 툴 : SSMS
개발 언어 : MSSQL

[소스 코드]
/*
[EOMONTH 를 사용해 지정한 특정 월 (MONTH) 의 마지막 날짜 출력 실시]
1. EOMONTH 는 SQL Server 2012 부터 제공하는 함수입니다
2. EOMONTH 는 지정한 특정 월 (MONTH) 의 마지막 날짜를 출력합니다
*/
SELECT EOMONTH('2022-05-05') AS '5월의마지막일자',
EOMONTH(GETDATE(), 2) AS '2개월뒤 7월의마지막일자';
[결과 출력]

반응형
'MsSqlDB' 카테고리의 다른 글
Comments