Redian新闻
>
I'm waiting for your oracle
avatar
I'm waiting for your oracle# Database - 数据库
s*n
1
I appreciate your kind answers.
my question is :
can I change a DATE type(eg. 1999/10/10 10:15:00) to total seconds from 1970/1/1,
like time() function in UNIX ? In fact,I want to calculate date in Pro*c.
when I get many records where the date is in DATE type shown above,how can I
calculate the time difference between two records? And what's more,how can I
add a duration(eg. 10 minutes) onto a date and write it back?
avatar
B*n
2
select old_date+(1/24/60)*10 from dual;
the above sql will add 10 minutes to 'old_date'. For instance:
SQL> select to_char(sysdate, 'MM-DD-YYYY HH24:MI:SS') "current time" from dual;
current time
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。