'날짜연산'에 해당되는 글 1건

  1. 2008.06.03 [PostgreSQL] 날짜연산 Tip

오늘의 0시
select date_trunc('day', current_timestamp);

* day 혹은 year, month
** current_timestamp : 현재의 타임스탬프



6개월전의 첫날
select date_trunc('month', current_timestamp + '-6 months');









http://homepage2.nifty.com/sak/w_sak3/doc/sysbrd/psql_k16.htm
Posted by tenn
,