Date Time calculation help

Поиск
Список
Период
Сортировка
От Unnikrishnan Menon
Тема Date Time calculation help
Дата
Msg-id 005e01c19d79$16219db0$e90aa8c0@UNNIKRISHNAN
обсуждение исходный текст
Список pgsql-sql
Hi,
 
I have a particular query in Oracle :
 
select mod((sysdate - to_date('15-JAN-02','dd-mon-yy')),1) from dual;
The above query gives 0.752.. as the difference between the two days which when multiplied by 24 gives around 3.1.. hrs.
 
I tried the same query in postgresql but the value returned is 0.
The query was:
select mod((current_date - '2002-15-01')),1);
 
I require the difference in time to the last second to be shown as time left. Could anyone suggest as to how to overcome this particular problem.
 
Thanx in advance,
 
Unni

В списке pgsql-sql по дате отправления:

Предыдущее
От: Chester Carlton Young
Дата:
Сообщение: Re: Long-running DELETE...WHERE...
Следующее
От: Gurudutt
Дата:
Сообщение: Re: Resources - Regular Expressions