# Days Compute

• 04-18-2001, 05:56 AM
rotem_fo
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.
• 04-18-2001, 06:30 AM
akkerend
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.

• 04-18-2001, 06:30 AM
rotem_fo
Sorry,
I ment how do i compute the minutes ???
Thanx.
• 04-18-2001, 06:41 AM
akhil
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
• 04-18-2001, 07:18 AM
akhil
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.
• 04-19-2001, 02:33 AM
rotem_fo
thanx everyone.