s****n 发帖数: 7 | 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? | B*****n 发帖数: 135 | 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 |
|