날짜의 표시를 24시간 제로 표시하는 방법
페이지 정보
작성자 서방님 댓글 0건 조회 152회 작성일 07-10-16 16:01본문
DECLARE @str varchar(30)
SET @str = '2005-07-28 오후 3:16:43'
SELECT
case
when charindex('오후',@str) > 0 then dateadd(hh,12,convert(datetime, replace(@str,'오후','')))
when charindex('오전',@str) > 0 then convert(datetime, replace(@str,'오전',''))
else convert(datetime,@str)
end
댓글목록
등록된 댓글이 없습니다.