- TIMESTAMP Conversion
* FROM_TZ : timestmap -> timestamp with time zone
FROM_TZ(TIMESTAMP '2012-04-23', '+03:00')
* TO_TIMESTAMP : character string -> timestamp
* TO_TIMESTAMP_TZ : character string -> timestamp with time zone
- INTERVAL Conversion
* TO_YMINTERVAL : character string -> interval year to month
* TO_DSINTERVAL : character string -> interval day to second
select sysdate
, sysdate + to_yminterval ('1-2')
, sysdate + to_yminterval ('-1-2')
from dual;
alter session set nls_date_format = 'yyyy-mm-dd hh12:mi:ss';
select sysdate
, sysdate + to_dsinterval ('1 1:1:1')
, sysdate + to_dsinterval ('-1 1:1:1')
from dual;
'Oracle > SQL Fundamentals II' 카테고리의 다른 글
14일차 # 6-7: Scalar Subquery (0) | 2012.04.23 |
---|---|
14일차 # 6-3: Pairwise vs. Nonpairwise (컬럼 비교) (0) | 2012.04.23 |
14일차 # 5-26: TZ_OFFSET (0) | 2012.04.23 |
14일차 # 5-25: EXTRACT ( ... FROM ... ) (0) | 2012.04.23 |
14일차 # Example (0) | 2012.04.23 |