Hi,
i have a table with date type column.
how can i compute the days between current date and the date in the table ?
thanx
Rotem.
Printable View
Hi,
i have a table with date type column.
how can i compute the days between current date and the date in the table ?
thanx
Rotem.
Substract the dates:
SELECT sysdate-date_column
FROM your_table;
This gives you difference in days between date_column and sysdate;
SELECT (sysdate-date_column)*(24*60*60)
FROM your_table;
gives you get the difference in seconds.
Sorry,
I ment how do i compute the minutes ???
Thanx.
SELECT sysdate-date_column
FROM your_table;
This gives you difference in days between date_column and sysdate;
SELECT (sysdate-date_column)*(24*60)
FROM your_table;
gives you get the difference in minutes
Substract the dates:
SELECT sysdate-date_column
FROM your_table;
This gives you difference in days between date_column and sysdate;
SELECT (sysdate-date_column)*(24*60)
FROM your_table;
gives you get the difference in minutes.
thanx everyone.