설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은
결과보기
EnterpriseDB
총 게시물 95건
목록 글쓰기 이전글 다음글

DATE_PART 함수를 이용한 날짜의 부분값 추출

글쓴이 : PostgresDBA   날짜 : 2012-12-14 (금) 23:52   조회 : 9445 인쇄
scott@[local]:5432 scottdb#SQL> 
select 
date_part('month',now()),  date_part('day',now()),  
date_part('hour',now()), date_part('minute',now()), date_part('second',now());

 date_part | date_part | date_part | date_part | date_part 
-----------+-----------+-----------+-----------+-----------
        12 |        14 |        23 |        50 | 48.195204
(1 row)

Time: 0.329 ms
scott@[local]:5432 scottdb#SQL> 

오라클의 TO_CHAR(SYSDATE,'DD') 류의 사용과 비슷하다는것 알수 있습니다.

댓글목록

목록 글쓰기 이전글 다음글

postgresdba.com